Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Step Line Chart Card Stats Block for React

A step line whose vertical axis is plan names, Free, Team, Business and Enterprise, with a change log under it in cells that share their hairlines and the current plan as a badge.

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 step line chart for React with Base UI. A start-aligned header says which plan the workspace is on and since when, "On Business since week 22", with the current plan and its seat count as a badge at the end of the row. Under it, a framed chart draws the plan over 26 weeks: the vertical axis is not a number but the four plan names, each with its own band, and the line holds a plan until the week it changed, then steps straight to the next. The history is drawn light, the stay the workspace is in now at full weight, each change is a ring and the area under the line is a faint fill. Below the figure a change log, a band of five cells that shares its hairlines from rail to rail and ends the block, says the same in words: the week, "Upgraded to Team" or "Downgraded to Team", and the seats then. Every path, ring, sentence and the headline are computed from one typed list of changes. Weeks are counted, never dated, so the copy never goes stale.

FAQ

How do I change the plans and the log?

Edit TIERS (cheapest first; they become the vertical axis) and CHANGES (the week, the plan's index and the seats then; the first entry is where the workspace started). The step path, the rings, the log, the header and the chart's accessible name are derived from them, and "Upgraded to" or "Downgraded to" is worked out by comparing each plan with the one before. The log's grid has five columns from lg, matching the five changes: change lg:grid-cols-5 if you add or remove entries.

How does the axis work with names instead of numbers?

Each plan owns an equal band of the chart's height and the line runs through the middle of its band, so the four names sit on four evenly spaced hairlines. The names are HTML text aligned to those lines by percentage, which keeps them crisp and selectable, and they are hidden from assistive technology because the log and the chart's name say the same thing.

Why does the line step instead of slope?

A plan does not change gradually: it holds until the week it changes. A step line (a run, then a vertical riser) shows that honestly, where a sloped line would suggest a trend between two readings that does not exist.

Is the chart accessible?

Yes. The drawing is an image whose name lists every change by week, and the change log under it is a real ordered list with the same information. The log's heading is visually hidden, the figures are in bdi elements and the chart box is dir="ltr" because time runs from the start to the end in every language.

What happens on a phone?

The chart takes a taller shape and keeps its week labels; the change log becomes a stacked list, one change per row, separated by hairlines. The header's badge drops under the sentence.

  • Pro

    A latency line against its 300 ms SLO for an API monitor: the stretches over the threshold are drawn thicker with ringed points, and a rail repeats the breaches, the time over and the worst reading in text.

  • Pro

    A sprint burndown in a card in a card: the ideal burn as a dashed line, the actual remaining work as a solid one, the gap shaded, a tick where scope was added and a band of three figures under the chart.

  • Pro

    A stacked area chart of weekly signups by channel in three foreground weights, with a legend of each channel's share beside it; pointing at a row or a layer keeps that layer and fades the others.

  • Pro

    Status Tile Grid Stats

    KPI bands and tiles

    Six service tiles for a hosting company, each with a state word and a p95 latency, where healthy tiles are plain and only a degraded and an incident tile change, with their cause and how long they have lasted.

  • Pro

    Changelog Features

    Timelines and steps

    A release feed for a changelog tool that presents its features as release entries: a New, Improved and Fixed filter with counts, a version rail, and a collapsible What changed list on each.

  • Pro

    A deployment timeline in a split: the run's facts at the start, and eight steps at the end, each with its start time, how long it took and a duration bar on one shared scale.