Skip to content
synccn

Odometer

New

Digits roll to each new value.

Live signups

Installation

$ pnpm dlx shadcn@latest add @synccn/odometer

First time in this project? Connect synccn with one command.

Usage

import { Odometer } from "@/components/ui/aurora";<Odometer value={48290} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

Odometer

Rolling-digit counter: each digit slides to its new value.

  • valuerequired
    number

    Number to show; digits roll when it changes.

  • minDigits
    number

    Default 1

    Pads with leading zeros when `format` is false.

  • format
    boolean

    Default true

    Adds thousands separators.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-label, aria-pressed
  • Respects the reduced motion setting
  • Shows a visible focus ring for keyboard users