ns-ui

Stepper Needle

Bounded numeric stepper with a large mono value readout, prominent -/+ buttons, and a labeled history strip: an inertial needle swings to each committed value while the strip advances, etching the last 20 adjustments with the newest mark highlighted.

Use when a bounded numeric value where the last twenty adjustments are worth seeing, the needle swinging to each committed value while the history strip etches the trail, with increment and decrement equally weighted; pick stepper-ratchet instead when decrementing is costly and should cost a deliberate hold, or slider-vernier when the final digit needs precision dragging rather than discrete steps.

Install

npx shadcn add https://design.helpmarq.com/r/stepper-needle.json
  • stepper
  • spinbutton
  • input
  • canvas
  • physics
  • form
  • micro-interaction

ns-ui / stepper-needle — a number stepper that draws its own history

Climate — Zone 2

Set the target temperature for the living room.

auto
current

20.8°C

heating 0.7°

Target temperature
°C
min 10 · max 30 · step 0.5

Click − or + (or type a number) to change the target. Each change is etched onto the history strip on the right — the ringed dot is your latest adjustment. A red edge appears when you hit the 10–30 °C limit.

Anodized cable organizer

$18.50 each · ships in 2 days

subtotal

$37.00

Quantity
pcs
min 1 · max 12 · step 1

Changing the quantity updates the subtotal above. Hold − or + to sweep quickly.

Keyboard: arrow keys step, Shift+Arrow jumps 10 steps, Home/End snap to the limits, typed values clamp on Enter. Hitting a limit gives the needle a hard-stop quiver.

Props

PropTypeDefaultDescription
value?numbercontrolled value; omit for uncontrolled
defaultValue?number20
min?number0
max?number100
step?number1
label?string"Value"accessible name for the spinbutton
unit?stringunit suffix rendered beside the value, e.g. "°C"
onValueChange?(value: number) => void
disabled?booleanfalse
className?string