Odometer

A number that rolls each digit on its own wheel, up when the value grows and down when it shrinks, and slides new digits in as the number gets longer.

  • Number
  • Data
  • Motion

Uses motion, clsx, tailwind-merge

Open in ChatGPTOpen in Claude

1,284

Installation

Add the component on its own with the CLI, or copy the file in by hand.

The CLI writes components/ui/odometer.tsx and installs motion, clsx and tailwind-merge. It needs the @keyframeui registry in components.json; add it once per project.

npx shadcn@latest add @keyframeui/odometer

Examples

Finished sections built with Odometer. Each one installs whole, with the component included.

Pricing

Monthly and yearly plans. Prices roll down to the yearly rate and back up, the yearly total rolls down from a year of monthly bills, and Starter's $0 never moves.

Starter

$0/ month

Free forever

For side projects and trying things out.

  • 3 projects
  • Community support
  • 7-day history

Pro

Popular

$24/ month

billed monthly

For teams shipping every week.

  • Unlimited projects
  • Priority support
  • 1-year history

Team

$59/ month

billed monthly

For companies that need control.

  • SSO and audit logs
  • Custom roles
  • Unlimited history

Dashboard KPIs

Currency with cents, a count, a percentage and milliseconds. The range switcher makes big jumps in both directions; between them the numbers drift live while the cards are on screen, and the delta chips flip color and arrow with their sign.

Overview

Live

Revenue

+12.4%

$48,210.50

vs. previous 24 hours

Active users

+3.8%

12,842

vs. previous 24 hours

Conversion

+0.6%

3.42%

vs. previous 24 hours

Avg. response

-3.1%

184 ms

vs. previous 24 hours

Indian Grouping

A rupee fundraiser that keeps ticking up. Switch between the Indian system of lakhs and crores (₹2,45,67,890) and international thousands (₹24,567,890): the commas roll to their new places while every digit stays put.

Raised for village libraries

Live

₹2,45,67,890

18,342 donorsof ₹5,00,00,000 goal

Landing Stats

A band of headline numbers that roll up from 0 the first time they scroll into view, one after another.

By the numbers

Shipped by teams in every time zone.

Downloads
2.4M
Countries
180+
Uptime, last 12 months
99.99%
Average rating
4.9/5

Props

valueRequired

Typenumber

The number to show. When it changes, each digit that differs rolls to its new value, the long way round in the direction the value moved.

format

TypeIntl.NumberFormatOptions

How to format the number: currency, decimals, percent, compact notation, units. Digits roll; symbols like $, ,, % and K move with the layout and crossfade when they change.

locale

TypestringDefault"en-US"

Locale for formatting. Fixed rather than read from the browser, so the server and the browser render the same thing.

stiffness

TypenumberDefault150

Spring stiffness of the roll. Higher is snappier.

damping

TypenumberDefault18

Spring damping of the roll. Lower overshoots more. Long rolls get a little extra, so they settle a hair past their digit and never bounce.

stagger

TypenumberDefault0.03

Seconds between neighboring places starting to roll. The rightmost changing digit goes first, so a change ripples left like a carry.

delay

TypenumberDefault0

Seconds to wait before rolling, after a change or, with rollOnView, after scrolling into view. Use it to stagger several numbers.

rollOnView

TypebooleanDefaultfalse

Hold every wheel on 0 until the number first scrolls into view, then roll up to it. The layout is at its final width from the start, so nothing shifts.

grouping

Type"international" | "indian"

Where the separators go. international groups by thousands (1,234,567); indian by lakh and crore (12,34,567). Unset, it follows the locale, so en-IN is already Indian. The separator itself, and everything else, still comes from the locale and format. When it changes, the commas roll to their new places and no digit turns.

className

Typestring

Extra classes for the number. It inherits font, size, weight and color, so style it like text. Other props, like aria-live, pass through to the outer span.