Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Vertical Stages Funnel Stats Block for React

A checkout funnel as five left-anchored bars with a connector row between each that says how many were lost, beside the overall conversion as a big number and the stage that leaks the most.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A vertical funnel for React with Base UI. A split with a solid divider. At the start, a header that names the stage that loses the most carts, "Shipping details lose the most carts", the overall conversion as a big rolling number, "39.9% of carts viewed end in an order", and three facts in one hairline frame (carts viewed, orders placed, the biggest drop). At the end, across the divider, five checkout stages as a list: each has its name, the people who reached it with their share of the first stage, and a bar that starts at the start of the column and is as wide as that share, at weights from 100% down to 40% of your theme's text colour. Between two stages a connector row says how many were lost on the way, "30% dropped, 3,750 people", on a hairline that runs to the end of the column. On a phone the figures come first and the funnel follows. The bars, drops, conversion and headline are all computed from the counts at each stage, in CSS with no chart library. For checkout, onboarding and sales funnels where the loss between stages is the story.

FAQ

How do I change the stages?

Edit FLOW at the top of the file: each stage is a name and the count of people who reached it, first to last. Every bar width, share, drop, lost count, the overall conversion, the biggest drop and the headline are computed from the counts. Five stages fit the column; four or six work, and the weights in FILLS are listed by position, so add or remove one with each stage.

How is a drop worked out?

As a share of the stage before, not of the first stage: "30% dropped" on the way to Shipping details means 3,750 of the 12,480 carts were left, while the stage's own share (70%) is of the first stage. The big figure is the last stage's share of the first, to one decimal, and the stage named in the headline is the one with the biggest drop.

Why aren't the lost carts drawn in red?

Whether a drop is a problem depends on the stage, so the block states it in words and numbers on a hairline and keeps the bars to weights of the text colour. That keeps it correct in every theme and readable in greyscale. If a drop crosses a threshold you care about, add a status badge to its connector row rather than tinting the bars.

Is the funnel accessible?

The funnel is an ordered list: each stage has an h3 with its name, its count and share as text, and the connector row that comes before it carries the drop and the people lost as text, so a screen reader hears "30% dropped, 3,750 people", then "Shipping details, 8,730, 70%". The bars and the hairlines are decorative. The big figure rolls up when it scrolls into view and ends on its real value; with reduced motion it simply appears.

Does it work in right-to-left languages?

The bars sit in a left-to-right box, so each one starts at the left edge of the column, while the names, numbers and connector rows follow the page direction, with each number and percent in a bdi element, and the down arrows never mirror.

How does it fit on a phone?

Below lg the divider becomes a rule with a + on each rail and the two parts stack: the header, the conversion and the facts first, then the funnel at its full width. The bars are as wide as the column, and nothing scrolls sideways at 320 pixels.

  • Pro

    A butterfly funnel for a signup-analytics tool: mobile and desktop bars grow outwards from a column of stage names, with each cohort's step conversion and a column that names the stronger cohort at every stage.

  • Pro

    A leak-first funnel for an onboarding tool: five steps, each a solid bar of who got that far followed by a hatched ghost of who was lost, the drop rate as the big figure, and the biggest leak ringed with a badge.

  • Pro

    A funnel as a real table for a sales team's pipeline: stage, deals, step conversion and value, each number with a thin bar to the scale of its column, and the overall conversion rolling in the header.

  • Pro

    A column funnel for a signup-flow analyser: five columns shrinking from the start to the end on a baseline, an icon plate under each as the step's node, and the share that made it across between two nodes.

  • Pro

    Progress Bar List Stats

    Goals and progress

    Six launch milestones in one hairline frame, each with its owner and due week, its count against the target, the percentage and a Progress bar, under a headline that counts the milestones done.

  • Pro

    A parcel carrier's weekly total in display type at the start of a split, with its three service levels as rows at the end, each with its count and a share bar, so the shares add up to exactly 100%.