Component packs › Dials › Detent Slider
Near a notch the thumb is pulled in like a magnet, it snaps with a small overshoot and each notch mark bounces as you pass.
Detent Slider is a stepped slider from Dials, a component pack with 8 components: Physical controls that click: dials, wheels, rings and switches with real detents. Price: $2 for the whole pack.
Built with: magnet detents, overshoot snap, bouncing marks.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
notches | string[] | ||
value | number | ||
label | string | ||
theme | 'dark' | 'light' | ||
sound | boolean | ||
haptics | boolean | ||
autoplay | boolean | ||
onChange | (index: number, label: string) => void |
readonly index: numberset(i: number): voiddestroy(): voidimport DetentSlider from './DetentSlider';
<DetentSlider />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Knobs and dials.