Installation
pnpm dlx shadcn add @eased-pro/bar-chartnpx shadcn add @eased-pro/bar-chartyarn dlx shadcn add @eased-pro/bar-chartbunx --bun shadcn add @eased-pro/bar-chartInstalls from the @eased-pro registry and MCP server. · Already have Pro? Sign in.
Add 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/bar-chart/bar-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>[] | One datum per bucket, oldest first, values ≥ 0. | |
xKey | string | Names each bucket and is the bar's identity across data changes. | |
series | { key, label, color? }[] | Colours default to chartColor(1…6). | |
label | string | The figure's name and the hidden table's caption. | |
stacked | boolean | false | Stack instead of grouping side by side. |
partialLast | boolean | false | Hatch the last bucket (still filling). |
height | number | 240 | Plot plus x labels. |
format / formatTick / formatX / formatXDetail | functions | Values, gridline labels, x labels, tooltip dates. | |
onActiveChange | (index, datum) => void | null when scrubbing stops. | |
legend | boolean | 2+ series |
Keyboard: Tab to the plot, arrows step, PageUp/PageDown jump, Home/End, Escape. A visually hidden table lists every value.
Motion signature: bars grow from the baseline with a 12ms stagger once; scrubbing glides a soft band under the bucket, dims the rest and rolls the values; a new range slides bars with the same key into place, grows new ones and sinks retired ones while the scale springs and gridlines slide, all in one beat.