Documentation Index
Fetch the complete documentation index at: https://mintlify.com/finsweet/attributes/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thefs-rangeslider attribute creates fully customizable range slider components with single or dual handles, value displays, and extensive formatting options. Perfect for price filters, quantity selectors, and any numeric range input.
Attribute Syntax
The attribute uses the following syntax:Elements
wrapper
Defines the range slider instance wrapper element.track
Defines the track of the slider along which handles move.fill
Defines the filled portion of the slider between handles.handle
Defines a draggable handle on the slider. Can have one or two handles for single or range selection.display-value
Defines an element to display a handle’s current value.Settings
min
Defines the minimum value of the range.max
Defines the maximum value of the range.start
Defines the starting value of a handle. Applied to handle elements.step
Defines the increment step for values.update
Defines when the input elements should be updated."move"(default) - Update while dragging"release"- Update only when handle is released
lazy
Defines if input values should be updated lazily (debounced).formatdisplay
Enables value formatting for display elements.Format Options
Extensive formatting options using the Intl.NumberFormat API:formatcurrency- Currency code (e.g., “USD”, “EUR”)formatstyle- “decimal”, “currency”, “percent”, “unit”formatnotation- “standard”, “scientific”, “engineering”, “compact”formatminimumfractiondigits- Minimum decimal placesformatmaximumfractiondigits- Maximum decimal placesformatunit- Unit type for “unit” style- And many more Intl.NumberFormat options
Usage Examples
How It Works
- Initializes on elements with the
wrapperattribute - Creates handle instances from handle elements
- Sets up track dimensions and handle constraints
- Listens for mouse/touch events on handles and track
- Calculates values based on handle position
- Updates display elements with formatted values
- Syncs hidden inputs for form submission
- Handles keyboard navigation with arrow keys
- Responds to window resize and visibility changes
Keyboard Controls
When a handle is focused:- Arrow Up / Arrow Right - Increment value by step
- Arrow Down / Arrow Left - Decrement value by step
Multiple Sliders
Create multiple independent sliders using instance identifiers:Form Integration
The slider automatically updates associated input fields (typically hidden inputs) that can be submitted with forms:Accessibility
The range slider includes:- Full keyboard support
- ARIA attributes
- Focus management
- Touch and mouse support
- Screen reader compatible
The slider automatically handles browser resizing and elements that are initially hidden, ensuring proper dimensions and positioning.