Skip to content
Sign upPro
DataFunnel chartMenu

Funnel chart (Pro)

ProIncluded in $99

A conversion funnel that says where people stop: one smooth shape that narrows step by step, the drop on a chip at every seam, the biggest drop called out and last period as a ghost.

ProFrom pricing page to paid, this week against last: connecting a source is where most people stop.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/funnel-chart

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { FunnelChart } from "@/components/ui/chatcn/pro/funnel-chart"

<FunnelChart
  title="Activation, this week"
  unit="people"
  steps={[
    { label: "Started sign up", value: 9640, previous: 8570 },
    { label: "Verified email", value: 7230, previous: 6600 },
    { label: "Connected a source", value: 3180, previous: 3170 },
  ]}
/>

<FunnelChart variant="bars" steps={steps} />     // a rounded bar per step with ribbons
<FunnelChart variant="compact" steps={steps} />  // a short strip for a dashboard card

By default the steps form one centered shape: a flat band per step, as wide as its share of the first, with an S curve narrowing into the next and a hairline seam between them. The gradient fades down the funnel. The drop between two steps sits on a chip at their seam, and the biggest drop turns red with a falling arrow and its name, so the place to work on is obvious; a step that grows reads plus. The headline is the share that makes it through, and with previous its change on last period in points, while last period is drawn as a dashed ghost outline around the shape. Point at a step and it saturates while the rest step back, with a tooltip card of its count, share, drop and last period. variant="bars" draws a rounded bar per step with a conversion ribbon to the next and dashed last period bars; variant="compact" lays the shape out left to right in about 100 px for a card, with the label and share under each step. On phones the labels take half the width and shorten with an ellipsis. Arrow keys walk the steps, and the table button shows every step with its drop.

Examples

States

ProThree steps without a comparison, loading, and a failed load.

Props

PropTypeNotes
stepsFunnelStep[]{ label, value, previous? }, first step first
variant"bands" | "bars" | "compact"Default bands, one tapered shape. bars has ribbons, compact is a card strip
headlineReactNodeDefault: the share that makes it through and its change in points. null hides it
unit, valueFormatHow counts read
title, descriptionReactNodeThe caption
loading, error, onRetry
labelsPartial<FunnelChartLabels>Every string, for translation

Keyboard

KeyAction
TabFocus the chart; the first step is read out
Arrow keysNext or previous step
Home, EndFirst or last step

Accessibility

  • The chart is summarized in words with the overall rate and the biggest drop, with a table of every step.
  • Drops are numbers on chips, not only shapes; the biggest drop carries an arrow and its name as well as red.
  • The readout says the pointed or focused step in words: count, share, drop and change on last period.

Motion

The shape grows out from its center, and bars from the start, once over 760 ms; chips and the ghost fade in with it. Pointing fades the other steps over 200 ms. Under reduced motion it appears drawn.