Installation
pnpm dlx shadcn add @eased-pro/line-chartnpx shadcn add @eased-pro/line-chartyarn dlx shadcn add @eased-pro/line-chartbunx --bun shadcn add @eased-pro/line-chartNeeds the @eased-pro registry and your Pro token in components.json. Create a token and copy the setup from your account .
Install the dependencies
pnpm add motionnpm install motionyarn add motionbun add motionAdd the Eased pieces it builds on
Copy each item’s files the same way, or install them with the CLI:
Add the files
- components/eased/line-chart/line-chart.tsx
Source is included with Eased Pro. Members download the files with the CLI command above, or through the MCP server.
Keep the folder layout
The files import each other by relative path (
../lib/motion), so keep each one at the path shown, undercomponents/eased/.
Props
| Prop | Type | Default | |
|---|---|---|---|
data | Record<string, string | number>[] | Oldest first, evenly spaced. | |
xKey | string | Labels with the same key slide when the range changes. | |
series | { key, label, color?, dashed?, area? }[] | dashed is a previous period at 40%. Keep keys stable so lines morph. | |
label | string | Names the figure, the slider and the hidden table. | |
curve | "monotone" | "linear" | "monotone" | |
height | number | 240 | Plot plus x labels; the legend sits above. |
format / formatTick / formatX / formatXDetail | functions | ||
onActiveChange | (index, datum) => void | Drive a headline outside the chart. | |
loading | boolean | false | Dims and pulses the lines in place. |
zero | boolean | area ? true : false | |
legend | boolean | 2+ series | Keys toggle series; hovering one dims the others. |
defaultHidden | string[] |
Keyboard: Tab to the plot; arrows, PageUp/PageDown, Home/End scrub; Escape lets go. aria-valuetext reads the date and every visible value; a hidden table lists all points.
Motion signature: a range change morphs every line from the shape on screen, resampled on shared x positions, while the value scale springs and gridlines slide; lines draw in left to right once; the crosshair glides on the snappy spring and the tooltip trails on its own, flipping before the edge; a toggled series flattens into the baseline as it fades.