Skip to main content
Signature

Import

To ensure optimal bundle sizes, see Optimize build size.
Vue

See this widget in action

Preview this widget and its behavior.

About this widget

The ais-range-input widget allows a user to select a numeric range using a minimum and maximum input.

Requirements

The attribute 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

Vue

Props

string
required
The name of the attribute in the record.
Vue
number
The minimum value for the input. When not provided, the minimum value is automatically computed by Algolia from the data in the index.
Vue
number
The maximum value for the input. When not provided, the maximum value is automatically computed by Algolia from the data in the index.
Vue
number
default:0
The number of digits after the decimal point to use.
Vue
object
default:"{}"
The CSS classes you can override:
  • ais-RangeInput. The root of the widget.
  • ais-RangeInput--noRefinement. The root of the widget without refinement.
  • ais-RangeInput-form. The form wrapper around the inputs and the submit button.
  • ais-RangeInput-separator. The separator between the min and the max.
  • ais-RangeInput-button. The button that triggers the submission of the form.
  • ais-RangeInput-label. The enclosing label of an input.
  • ais-RangeInput-input. The inputs.
  • ais-RangeInput-input--min. The input for the minimum value.
  • ais-RangeInput-input--max. The input for the maximum value.
Vue

Customize the UI

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 }. A value that contains the currently applied refinement.
  • range: { min: number, max: number }. A value that contains the minimum and maximum available value.
  • canRefine: boolean. Whether the refinement can be applied.
  • refine: ({ min: number, max: number }) => void. A function to select the refinement.
  • sendEvent: (eventType: 'click', facetValue: string) => void. The function to send click events.
    • The view event is automatically sent when the facets are rendered.
    • The click event is automatically sent when refine is called.
    To learn more, see the insights middleware.
Vue
The slot to override the DOM output for the label of the minimum value.
Vue
The slot to override the DOM output for the label of the maximum value.
Vue
The slot to override the DOM output for the label of the submit button.
Vue
The slot to override the DOM output for the separator beteween the inputs.
Vue

HTML output

HTML
Last modified on July 22, 2026