Signature
Import
- Component
- Plugin
To ensure optimal bundle sizes,
see Optimize build size.
Vue
About this widget
Theais-autocomplete
widget provides the logic to create a connected component that provides access to all indices of your InstantSearch instance.
- To configure the number of hits to show, use the
ais-hits-per-page
widget or theais-configure
widget. - To retrieve results from multiple indices, use the
ais-index
widget.
Examples
Vue
Props
Whether to escape HTML entities from hits string values.
Vue
Customize the UI
default
The slot to override the complete DOM output of the widget.When you implement this slot, none of the other slots will change the output, as the default slot surrounds them.Scope
currentRefinement: string
. The current value of the query.indices: object[]
. The list of indices.refine: (string) => void
. The function to change the query.
highlight
widget (see below). Each index is provided with:indexName: string
. The name of the index.indexId: string
. The id of the index.hits: object[]
. The resolved hits from the index matching the query.results: object
. The full results object from the Algolia API.sendEvent: (eventType, hit, eventName) => void
. The function to sendclick
orconversion
events. Theview
event is automatically sent when the connector renders hits. You can learn more about theinsights
middleware.eventType: 'click' | 'conversion'
hit: Hit | Hit[]
eventName: string
Vue