Component packs › Dials › Detent Slider

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.

Detent Slider props

PropTypeDefaultDescription
notchesstring[]
valuenumber
labelstring
theme'dark' | 'light'
soundboolean
hapticsboolean
autoplayboolean
onChange(index: number, label: string) => void

Methods on the ref

Use it in React

import DetentSlider from './DetentSlider';

<DetentSlider />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Dials

Good for: Knobs and dials.