Signature
Import
- Component
- Plugin
To ensure optimal bundle sizes,
see Optimize build size.
Vue
About this widget
Since there are many third-party range sliders for Vue, none is included by default. However, you can use the default slot inais-range-input
to make a slider.
The example here uses Vuetify’s v-range-slider
.
Make sure you’ve installed the library for your Vue version and are familiar with the API of v-range-slider
.
For Vue 2:
- Install Vuetify 2
- API reference for
v-range-slider
- Install Vuetify 3+
- API reference for
v-range-slider
Requirements
Theattribute
provided to the widget must be in attributes for faceting,
either on the dashboard or using the attributesForFaceting
parameter with the API.
The values of the attribute must be numbers, not strings.
Examples
Props
The name of the attribute in the record.
Vue
The minimum value for the input.
When not provided, the minimum value is automatically computed by Algolia from the data in the index.
Vue
The maximum value for the input.
When not provided, the maximum value is automatically computed by Algolia from the data in the index.
Vue
The number of digits after the decimal point to use.Use a negative value to round values to powers of 10.For example, a precision of -2 would round a number to the nearest hundred,
while a precision of -3 would round it to the nearest thousand.
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: { min: number, max: number }
. The currently applied refinement.range: { min: number, max: number }
. The minimum and maximum available value.refine: ({ min: number, max: number }) => void
. A function to select the refinement.
HTML output
HTML