Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Step Tags KPI Bar Stats Block for React

Four lifecycle figures for an email tool, each cell tagged with its step on its top rule (1 Reach, 2 Trial, 3 Paid, 4 Renew) and showing how much of the step before it carried on.

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 KPI bar of step tags for React with Base UI. A start-aligned header states the headline number, "902 readers became paying customers in March", and under it four cells sit a little apart, each in a hairline frame whose lines run past its corners. A small outlined tag breaks each frame's top rule and names the step: 1 Reach, 2 Trial, 3 Paid, 4 Renew. Under the tag the value rolls up, then its label, then how much of the step before it carried on ("7.5% of readers reached", "25.0% of trials started", "86.0% of plans up for renewal"), so the four cells read from the start to the end as a journey. Every value and share is computed from one typed set of counts, so the text can't disagree with itself. The cells are an ordered list, with the step in the tag, and the block has no colour for good or bad. Four across from lg, two by two below it, tags kept. For a lifecycle, funnel or growth page.

FAQ

How do I change the steps or the figures?

Edit COUNTS and STAGES at the top of the file. COUNTS holds the month's counts; each stage in STAGES has a tag, a label, the value it shows and the count its share is taken from (0 for the first step, which has no share). The share is computed as the value over that count, to one decimal. Add a fifth stage and the grid is ready for it from lg if you change lg:grid-cols-4 to lg:grid-cols-5; the headline reads COUNTS.paid.

How does the tag break the line?

Each cell is a relative list item with a Guides component for its frame (lines that run past the corners, which is why the cells keep a gap-6 between them). The tag is an outlined Badge placed on the top rule with -top-3 and a bg-background fill, so it covers the line behind it. It's sentence case rather than the uppercase, letter-spaced label that stat blocks often carry.

How do the numbers roll, and what if motion is off?

Each value is the catalog's Sliding Number with trigger="view": it waits at zero and rolls its digits up once the cell scrolls into view. With reduced motion the digits change in place, and screen readers always read the final value, never the digits in between. The numbers use tabular figures so the cell doesn't shift.

Is it accessible?

Yes. The steps are an ordered list; each cell's tag names its step, and its figures are a description list: the label is a term, and the value and the share are its descriptions. The value is drawn first but read after its label. Values and shares sit in bdi elements, so a right-to-left page keeps the percent signs where they belong.

How does it fit on a phone?

Two by two, the tags stay on each cell's rule, and the cells keep their gap and overshoot, inset from the rails. At 320 pixels each cell is about 115 pixels wide, so the values drop to text-2xl. Nothing scrolls sideways.

  • Pro

    Connected KPI Bar Stats

    KPI bands and tiles

    Four headline figures for a subscription analytics tool in cells that share their hairlines from rail to rail, each with its change on the month before and a tiny sparkline of the last twelve months.

  • Pro

    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.

  • Pro

    Delta Pill KPI Tiles Stats

    KPI bands and tiles

    Four raised KPI tiles for a checkout analytics tool, each with its change as a pill: filled for a rise, outlined for a fall and muted for none, with an arrow or a dash and a sign.

  • Pro

    Ratio Tile Grid Stats

    Goals and progress

    Four goal tiles for a publishing house, each a ratio like 11 of 16, a progress bar and a pace tick that marks where the plan says the goal should stand today, with how many days ahead or behind it is.

  • Pro

    Metric Hero Strip Features

    Metrics and charts

    Four metric-over-feature columns for a data-pipeline tool: a giant tabular figure and label, then the feature that makes it true, in one divided band under a centred header.

  • Pro

    A benchmark for a streaming-analytics tool: three tiles that set the product against the industry average with a large figure and two bars each, a header row with two buttons, and a closing strip of eight wordmarks.