Components · Data Display
Funnel
BetaAdded v4.5.0
Drop-off through ordered steps, with conversion from the first step.
import { Funnel } from '@nexub/react';Playground
Props
| Visited | 12,400 | 100% of Visited |
|---|---|---|
| Started signup | 4,100 | 33% of Visited |
| Verified email | 2,900 | 23% of Visited |
| First payment | 1,240 | 10% of Visited |
<Funnel className="w-full" data={…} title="Signup funnel, October" />Examples
Signup funnel
Conversion and drop-off
`show="both"` with `tableView`.
Several series
Web and app side by side, with conversion.
States
Signup funnel, October Visited 12,400 100% of Visited Started signup 4,100 33% of Visited Verified email 2,900 23% of Visited First payment 1,240 10% of Visited defaultloading
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| datarequired | FunnelDatum[] | — | Steps in order, largest first. |
| titlerequired | string | — | Accessible name and table caption. |
| data[].values | Record<string, number> | — | 11.3: the other series' numbers for this step, keyed by series key. |
| series | FunnelSeries[] | — | 11.3: several series per step, drawn as thin bars with a legend. key: 'value' reads each step's value; other keys read values[key]. The interactive tooltip uses value. |
| show | 'both' | 'drop-off' | 'conversion' | — | 11.3: visible numbers under each step: share of the first and the previous step, how many dropped off, or both. Unset draws the bars only. |
| tableView | string | boolean | — | 11.3: a "Show as table" disclosure under the drawing with the same data; a string sets its label. |
| color | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 1 | |
| emptyState | React.ReactNode | — | Shown when there is no data. Defaults to the "no data" message. |
| errorState | React.ReactNode | — | Shown in place of the data when a load failed, for example an ErrorState with a retry action. Wins over loading and empty. |
| interactive | boolean | — | A crosshair and tooltip that follow the pointer, and arrow-key navigation between points. |
| loading | boolean | — | Shows a skeleton in place of the data and sets aria-busy. |
| onPointClick | ((point: ChartPoint<{ label: string; value: number; }>) => void) | — | Click, tap, or Enter/Space on a point. Turns interactive on unless it is set to false. |
| valueFormat | ((value: number) => string) | fmt |
Accessibility
Screen reader
The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
On iOS & Android
Web only
Funnel has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.