Browse components
Tally
Animates a number from one value to another when it enters the viewport.
0
developers shipping
Installation
npx shadcn@latest add @glint-ui/tallyFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/tally.json
Usage
import { Tally } from "@/components/ui/tally";
<Tally 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. |