IN-05Inputs
Detent Dial
Rotary knob that clicks from notch to notch and coasts when flicked, built with React and Motion.
PRONatural Date Input and more like it are in Kokonut UI Pro
Installation
Detent Dial is a free, open-source React component in the Kokonut UI Inputs collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/detent-dial.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/detent-dialOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/detent-dial.tsx.
npm install motionUsage
import DetentDial from "@/components/kokonutui/detent-dial";
export default function Example() {
return <DetentDial />;
}Props
labelstringDefault "Temperature"Accessible name, also shown inside the knob.
minnumberDefault 16maxnumberDefault 30stepnumberDefault 0.5defaultValuenumberDefault 21Initial value when uncontrolled. Double-clicking the knob returns here.
valuenumberControlled value.
onValueChange(value: number) => voidformatValue(value: number) => stringDefault (v) => `${v.toFixed(1)}°`Formats the readout, the end labels and aria-valuetext.
sizenumberDefault 240Diameter in px.
disabledbooleanDefault falseclassNamestringExtra classes for the root element.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

