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
Centered rounded bars that narrow step by step, with the rate between each step.
npx shadcn@latest add ikislay/pixel-ui/funnel-chartimport { FunnelChart } from "@/components/ui/funnel-chart"const data = [{ label: "Visited", value: 12400 },{ label: "Signed up", value: 3100 },{ label: "Paid", value: 640 },]export function Demo() {return <FunnelChart label="Signup funnel" data={data} />}
1// Loading…
Options you can pass to customize this component.
data*{ label: string; value: number }[]The steps in order. Each bar is sized against the first step.
label*stringNames the chart for screen readers and captions its data table.
format(value: number) => stringFormats values wherever the chart shows them. Defaults to short numbers like 12.4K.
colorstringAny CSS color. Later steps show it a little lighter.
classNamestringMerged onto the root element.