tanstack-ranger

Builds accessible range and multi-range sliders using TanStack Ranger headless utilities.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/firstaxel/neon --skill tanstack-ranger-firstaxel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tanstack-ranger
Source: https://github.com/firstaxel/neon/tree/main/.agents/skills/tanstack-ranger
Command: npx skills add https://github.com/firstaxel/neon --skill tanstack-ranger-firstaxel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @tanstack/react-ranger, @tanstack/ranger-core.

What problem does it solve? Building range sliders from scratch requires handling drag logic, keyboard navigation, ARIA attributes, value interpolation, and multi-thumb collision behavior. This Skill provides the patterns and APIs to implement fully accessible single, range, and multi-thumb sliders without writing that low-level interaction logic yourself. ## Core Features & Use Cases - Headless Slider Logic: Use the useRanger hook to manage values, steps, ticks, and drag state while keeping full control over markup and styling. - Multi-Thumb and Custom Steps: Render multi-range sliders with sorted values, custom step positions, tick marks, and logarithmic interpolation. - Built-in Accessibility: Handles expose role="slider", ARIA value attributes, and keyboard navigation through getHandleProps(). - Use Case: Add a price-range filter to an e-commerce page by rendering two handles on a track, reading sortedValues in onChange, and enforcing a minimum gap between thumbs. ## Quick Start Ask the AI to create a React price-range slider from 0 to 100 with two draggable thumbs using TanStack Ranger.

Frequently Asked Questions about tanstack-ranger

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a range slider in React with TanStack Ranger?▼

Install @tanstack/react-ranger and call useRanger with getRangerElement, values, min, max, and onChange. Render a track div with position relative, map rangerInstance.handles to button elements, and spread handle.getHandleProps() for drag and keyboard support.

How to build a multi-range slider with multiple thumbs?▼

Pass an array with more than two values to the values option, such as [10, 40, 60, 90]. Use rangerInstance.getSteps() to render track segments between thumbs and always read instance.sortedValues in onChange since handles can cross during dragging.

Does TanStack Ranger support frameworks other than React?▼

Yes, TanStack Ranger has stable adapters for Vue, Solid, Svelte, and Angular, all built on the framework-agnostic @tanstack/ranger-core package. The core API for values, steps, and handles remains consistent across adapters.

Can I use a logarithmic scale on a slider?▼

Yes, pass the logarithmicInterpolator exported from @tanstack/react-ranger as the interpolator option. This maps slider positions to a logarithmic value distribution, useful for ranges like 1 to 1000 where linear steps feel uneven.

Why are my slider thumb values in the wrong order after dragging?▼

Handles can cross each other during drag operations, so the raw values array may be unordered. Always use instance.sortedValues inside the onChange callback to get values in ascending order before updating your state.

Is TanStack Ranger slider accessible for keyboard and screen readers?▼

Yes, getHandleProps() returns role="slider", aria-valuemin, aria-valuemax, aria-valuenow, and keyboard handlers for arrows, Home, End, and Page keys. Add an aria-label to each handle to describe its purpose for screen reader users.