import { FunnelChart } from "@senvenli/react/charts";
const STEPS = [
{ name: "Visited the store", value: 24800 },
{ name: "Viewed a product", value: 13150 },
{ name: "Added to cart", value: 4620 },
{ name: "Started checkout", value: 2310 },
{ name: "Placed an order", value: 1525 },
];
const count = new Intl.NumberFormat("en");
export default function Example() {
return <FunnelChart title="Checkout funnel" period="March 2026" steps={STEPS} valueFormatter={count.format} />;
}import { FunnelChart } from "@senvenli/react/charts";Examples
Counts only
Without the conversions, when the absolute numbers are the point.import { FunnelChart } from "@senvenli/react/charts";
const STEPS = [
{ name: "Trials started", value: 860 },
{ name: "Invited a teammate", value: 512 },
{ name: "Connected a data source", value: 298 },
{ name: "Upgraded to a paid plan", value: 121 },
];
export default function Example() {
return <FunnelChart title="Trial to paid" period="Q1 2026" steps={STEPS} showStepConversion={false} showTotalConversion={false} />;
}Guidelines
When to use it
- Where people drop out of a flow.
Accessibility
Built in
- A "Show as table" button shows the same data as a table, which screen readers get by default.
You provide
- A title that says what the figure is.
API reference
FunnelChart
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | – | What the chart shows, over it; leave it out when a card or a heading already says so. |
aria-label | string | – | Names the chart when it has no visible |
period | string | – | |
isLoading | boolean | – | |
emptyState | React.ReactNode | – | Shown instead of the plot when there is no data: an |
stepsRequired | readonly FunnelStep[] | – | Truly ordered steps, each a subset of the one before. |
valueFormatter | ChartValueFormatter | plain | |
showStepConversion | boolean | true | The conversion from the previous step beside each count. On by default. |
showTotalConversion | boolean | true | The first-to-last conversion in the subtitle. On by default. |
titlestringWhat the chart shows, over it; leave it out when a card or a heading already says so.
aria-labelstringNames the chart when it has no visible
title(a card's heading already says what it shows).periodstringisLoadingbooleanemptyStateReact.ReactNodeShown instead of the plot when there is no data: an
EmptyState size="small"or text; "No data" by default.stepsRequiredreadonly FunnelStep[]Truly ordered steps, each a subset of the one before.
valueFormatterChartValueFormatterDefaultplainshowStepConversionbooleanDefaulttrueThe conversion from the previous step beside each count. On by default.
showTotalConversionbooleanDefaulttrueThe first-to-last conversion in the subtitle. On by default.