Rolling Number Stepper
A quantity field whose changed digits roll in the direction of travel, accelerates on press-and-hold like a hardware stepper, and nudges sideways with a reason at its bounds. A real spinbutton you can type into.
Try it: Press and hold +; use ↑ ↓, PageUp/PageDown, Home/End, or type a number.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/rolling-number-stepper.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/rolling-number-stepper. You can also copy the source into components/ui/rolling-number-stepper.tsx (view on GitHub).
Usage
import { RollingNumberStepper } from '@/components/ui/rolling-number-stepper'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
value / defaultValue / onValueChange | number | 8 | Controlled or uncontrolled value. |
min / max / step | number | 1 / 250 / 1 | Bounds and increment. |
label / hint / unit | string | 'Seats' | Visible label, helper text and unit. |
format | (n) => string | toLocaleString | Display formatting. |
disabled | boolean | false | Disables the field. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motionlucide-react
Related Product UI components
- File Drop Uploader
A calm dropzone that lifts and tints on drag-over, then gives each file its own row with a spring progress hairline, a tick that pops on completion, and errors that say what went wrong with one-tap…
- Inset Settings List
An iOS-style grouped inset list with tinted icon tiles, hairlines inset to the label edge, switches whose knob stretches on press, and choice rows that push a detail page with a parallax slide and…
- Glass Segmented Control
An iOS-style segmented control whose selected thumb is a lifted glass pill that springs between segments with a press squish — native radio semantics, arrow keys and an opaque reduced-transparency…
- Keyboard Shortcut Hint
A cheat sheet of tactile keycaps that knows your platform (⌘ ⌥ ⇧ vs Ctrl Alt Shift); hold real keys and matching caps sink and light up, complete a combo and its row confirms. Exports Kbd for inline…
- Dynamic Status Island
A black capsule that morphs its silhouette between live activities — recording with a level meter, a focus timer with pause, an upload with a progress hairline, a success tick — size and radius on…
- Feedback State Panel
One surface for the screens nobody designs — empty, error, offline, permission and success — each with its own glyph and motion character, copy that names the next step, and a primary action with a…