Skip to content

    Browse components

    Stats Count

    A row of big statistics that count up with a staggered reveal when scrolled into view.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/stats-count

    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/stats-count.json

    Usage

    import { StatsCount } from "@/components/ui/stats-count";
    
    <StatsCount
      stats={[
        { value: 2.4, decimals: 1, suffix: "M", label: "Deploys a week" },
        { value: 99.99, decimals: 2, suffix: "%", label: "Uptime" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    statsReactNode—Array of { value, label, prefix?, suffix?, decimals?, description? }.
    durationnumber2200Ms each number takes to count up.
    staggernumber140Ms between each stat starting.
    dividersbooleantrueHairline dividers between stats.
    repeatbooleanfalseCount again each time it re-enters the viewport.
    accentstring"#a3e635"Color of the bar that sweeps under each number.
    classNamestring—Extra classes for the root element.