Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
| Flow | Direction | Value |
|---|---|---|
| Business | In | $23K |
| Presentation | In | $14.6K |
| Finance | In | $12.7K |
| Development | In | $23.1K |
| Investments | Out | $28.6K |
| Startups | Out | $15.8K |
| Operations | Out | $9.1K |
| Reserves | Out | $19.8K |
Ribbons that gather into a central total and fan back out to where it went.
npx shadcn@latest add ikislay/pixel-ui/flow-hubimport { FlowHub } from "@/components/ui/flow-hub"export function Demo() {return (<FlowHublabel="Sales by source and destination"totalLabel="Total sales"inputs={[{ label: "Business", value: 22987 },{ label: "Finance", value: 12657 },]}outputs={[{ label: "Investments", value: 26644 },{ label: "Startups", value: 9000 },]}
1// Loading…
Options you can pass to customize this component.
inputs*{ label: string; value: number; color?: string }[]What flows in on the left. Their sum is the total in the center.
outputs*{ label: string; value: number; color?: string }[]Where it goes on the right. Colors carry on through the palette after the inputs.
label*stringNames the chart for screen readers and captions its data table.
totalLabelstringThe caption above the total in the center.
format(value: number) => stringFormats values wherever the chart shows them. Defaults to short numbers like 12.4K.
heightnumberHeight in pixels. The width fills the parent, with room for labels on both sides.
classNamestringMerged onto the root element.