Skip to content

    Browse components

    Odometer

    An odometer-style number where every digit column rolls on a spring, with − / + controls and soft faded edges.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/odometer

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/odometer.json

    Usage

    import { Odometer } from "@/components/ui/odometer";
    
    <Odometer value={128} step={1} fontSize={80} />

    Props

    PropTypeDefaultDescription
    valuenumber128Starting value. Changing it jumps the counter.
    stepnumber1Amount per button press.
    minnumber0Lowest value.
    maxnumber999999Highest value.
    fontSizenumber80Digit size in px.
    showControlsbooleantrueShow the − / + buttons.
    fadebooleantrueFade digits at the top and bottom.
    onChangeReactNode—(value: number) => void, called after a button press.
    classNamestring—Extra classes for the root element.