Slider
v0.21.1Single value or range.
Slider default
Install
npx shadcn add @syncrobotic/slider Also installs: radix-ui, @syncrobotic/cn
Overview
A track with a thumb for picking a value or a range by dragging.
When to use
- Volume, brightness, a rough range like a time window.
- Always with the current value shown beside it.
Use something else
- An exact value or a value with a unit: Number field.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Slider disabled
Slider steps
Slider volume
Usage rules
- Always show the current value in the label next to it.
Changelog
- 0.21.12026-11-21Compiles with noUncheckedIndexedAccess, as strict products build it; behaviour unchanged.
- 0.21.02026-11-20valueText: the value as screen readers say it (aria-valuetext) on a controlled slider, e.g. "0:42 of 1:00" on a media player's timeline instead of a bare 42.
- 0.17.32026-11-19Tracks and quiet shapes use the new --track token, so they read in dark mode (1.5:1 on their surface; they were near invisible).