Line chart
A multi-series line chart with a gliding crosshair, legend toggles, and paths that morph between ranges.
Give changing totals a clear sense of movement.
npx shadcn@latest add @silicon-ui/animated-counternpx shadcn@latest add @silicon-ui/animated-counterInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/animated-counter/animated-counter.tsxcomponents/silicon-ui/animated-counter/animated-counter.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
value* | number | — |
label | string | — |
prefix | string | "" |
suffix | string | "" |
decimals | number | 0 |
animateOnViewRoll every digit up from zero the first time the counter scrolls into view. | boolean | false |
localeFormatting locale. Fixed by default so server and client render the same digits. | string | "en-US" |