127 Components

Kinetic Rolling Counter

Text

Mechanical odometer numeric ticker where each digit column spins independently along a vertical 0-9 reel using Hooke's Law springs.

Current value: 1248

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:framer-motionlucide-reactclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/kinetic-rolling-counter.json"

Props

TypeScript props supported by <KineticRollingCounter />.

4 props
PropTypeDefaultDescription
defaultValuenumber1248Initial non-negative integer displayed on the odometer.
stepnumber17Amount added or subtracted per stepper click.
stiffnessnumber340Hooke's Law spring stiffness for vertical digit reel travel.
dampingnumber26Spring damping coefficient controlling reel settle bounce.

Key Features

  • Independent 0–9 vertical digit reels that roll proportionally to the numeric delta in each place value.
  • Tabular monospace geometry preventing horizontal layout jitter during high-speed increments.
  • Screen-reader live status region paired with aria-hidden visual reels.

Keyboard & Accessibility

  • Provides an sr-only role='status' live region announcing the complete number cleanly.
  • Marks the 0–9 vertical reel strips with aria-hidden='true' to prevent screen readers from reading all 10 digits per column.
  • Snaps digit reels immediately without vertical travel when prefers-reduced-motion is active.