What problem does it solve?
TanStack Ranger eliminates the complex, error-prone work of implementing accessible single-value and multi-thumb range sliders, including keyboard handling and correct thumb positioning.
Core Features & Use Cases
- Accessible single/range/multi sliders: Generates slider handles with the required ARIA attributes and keyboard navigation for screen-reader and keyboard users.
- Headless control over UI: Provides framework-agnostic logic via
@tanstack/ranger-core so you can fully customize markup and styling while keeping behavior correct.
- Multi-thumb constraints and accurate visuals: Manages sorted values (
sortedValues) to handle thumb crossing during drag and exposes track segments/ticks for rich UIs.
- Use Case: Create an analytics filter UI where users adjust a minimum and maximum threshold with tick marks, while keeping interactions consistent across browsers and frameworks.
Quick Start
Use the tanstack-ranger skill to wire useRanger to your track element, pass values, min, max, and onChange, and render thumbs using handle.getHandleProps() with positions derived from handle.getPercentage().