Browse components
Count Up
Animates a number from one value to another when it enters the viewport.
0
developers shipping
Installation
npx shadcn@latest add @glint-ui/count-upFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/count-up.json
Usage
import { CountUp } from "@/components/ui/count-up";
<CountUp to={12480} duration={2000} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| to | number | 12480 | Target value. |
| from | number | 0 | Start value. |
| duration | number | 2000 | Ms from start to finish. |
| decimals | number | 0 | Fraction digits. |
| separator | string | "," | Thousands separator. |
| className | string | — | Extra classes for the root element. |