Compositions
Core Primitives
Transitions
Typography
Customize
1
4
Installation
$ pnpm dlx shadcn@latest add @framecn/animated-line-chart
Usage
import { AnimatedLineChart } from "@/components/framecn/animated-line-chart";<AnimatedLineChart />API Reference
AnimatedLineChart
| Prop | Type | Default |
|---|---|---|
data | number[] | [12, 19, 8, 15, 22, 18, 28, 25, 32] |
width | number | 1000 |
height | number | 500 |
strokeColor | string | "#22c55e" |
strokeWidth | number | 4 |
background | string | "#0a0a0a" |
gridColor | string | "#27272a" |
showDot | boolean | true |
speed | number | 1 |
fps | number | 30 |
durationInFrames | number | 90 |
className | string | - |
Notes
SVG stroke-dashoffset animation
The chart line is drawn using stroke-dashoffset animation for a smooth left-to-right reveal effect.