Signature
Import
- Component
- Plugin
To ensure optimal bundle sizes,
see Optimize build size.
Vue
See this widget in action
Preview this widget and its behavior.
About this widget
Requirements
Declare each facet attribute inattributesForFaceting.
Configure the facet order in the Algolia dashboard or
with renderingContent.facetOrdering.
By default, <ais-dynamic-widgets> requests all facets and up to 20 values per facet.
These defaults help avoid another request after matching widgets mount.
Override the defaults with facets and max-values-per-facet.
<ais-dynamic-widgets> requires Vue InstantSearch 3.8.0 or later.Examples
Options
Widget[]
required
The refinement widgets to render in the order specified by
renderingContent.facetOrdering.Each top-level child must resolve to one unique facet attribute.
Define an attribute prop for single-attribute widgets or an attributes prop for hierarchical widgets.function
Transforms the facet attributes before rendering.The second argument contains the search results, which you can use to derive a different attribute list.The function receives the ordered facet attributes from
renderingContent.facetOrdering.facets.order and returns an array.Vue
['*']|[]
default:"['*']"
The facets to apply before dynamic widgets get mounted.
Setting the value to
['*'] will request all facets and avoid an additional network request once the widgets are added.number
default:20
The maximum number of values to request for each facet.Set this value to at least the highest
limit or show-more-limit used by a dynamic widget.
This helps avoid an additional request after the widget mounts.Set max-values-per-facet to at least the largest number of pinned values configured for any facet.
Otherwise, some pinned facet values might not appear.Vue