ais-current-refinements
<ais-current-refinements // Optional parameters :included-attributes="string[]" :excluded-attributes="string[]" :transform-items="function" :class-names="object" />
About this widget
The ais-current-refinements
widget displays a list of refinements applied to the search.
Examples
1
<ais-current-refinements />
Props
included-attributes
|
type: string[]
Optional
The attributes to include in the widget (all by default). Cannot be used with |
||
Copy
|
|||
excluded-attributes
|
type: string[]
default: ["query"]
Optional
The attributes to exclude from the widget. Cannot be used with |
||
Copy
|
|||
transform-items
|
type: function
default: x => x
Optional
Receives the items, and is called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, and remove or reorder them. |
||
Copy
|
|||
class-names
|
type: object
default: {}
Optional
The CSS classes to override.
|
||
Copy
|
Customize the UI
default
|
The slot to override the complete DOM output of the widget. Scope
Where an item is an
Where each refinement is an
|
||
Copy
|
|||
item
|
The slot to override the DOM output of an item. Scope
Where item is an
Where each refinement is an
|
||
Copy
|
|||
refinement
|
The slot to override the DOM output of a single refinement. Scope
Where refinement is an
|
||
Copy
|
HTML output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<div class="ais-CurrentRefinements">
<ul class="ais-CurrentRefinements-list">
<li class="ais-CurrentRefinements-itemt">
<span class="ais-CurrentRefinements-label">
Category:
</span>
<span class="ais-CurrentRefinements-category">
<span class="ais-CurrentRefinements-categoryLabel">
Movies & TV Shows
</span>
<button class="ais-CurrentRefinements-delete">✕</button>
</span>
<span class="ais-CurrentRefinements-category">
<span class="ais-CurrentRefinements-categoryLabel">
Others
</span>
<button class="ais-CurrentRefinements-delete">✕</button>
</span>
</li>
<li class="ais-CurrentRefinements-item">
<span class="ais-CurrentRefinements-label">
Brand:
</span>
<span class="ais-CurrentRefinements-category">
<span class="ais-CurrentRefinements-categoryLabel">
Algolia
</span>
<button class="ais-CurrentRefinements-delete">✕</button>
</span>
</li>
</ul>
</div>