Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Ring Progress Metric Split Features Block for React

A split for a platform SLA monitor: copy, four ticks and a button at the start, and at the end one chart of three concentric rings with a legend, whose values a 7, 30 or 90 day toggle swaps.

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 split metric section for React with Base UI. At the start, a header ("SLAs you can read at a glance"), a sentence, four ticks and the Shine Button; at the end, behind a hairline divider (under the copy on a phone), a framed figure whose lines run past the corners with + marks. The figure holds one chart of three concentric rings, availability on the outside, edge hit rate and headroom inside, drawn in three weights of the foreground colour, with the number of targets met rolling in the middle. A legend beside it (under it on a phone) gives each metric's value, its target and whether it is met. A three-button toggle at the top of the figure (7, 30 or 90 days) swaps all of it together: the arcs grow or shrink, the digits roll and the count updates. It's built from Guides, Toggle Group, Sliding Number and Shine Button, with CSS transitions for the rings.

FAQ

How do I change the metrics and the periods?

Edit METRICS (name, target, decimals, ring radius and its colour classes) and PERIODS (an id, a label and one value per metric, in percent). The rings, the legend, the count of targets met and the status line are all read from those two tables. A fourth metric needs another ring radius inside the others, 22 units smaller each time.

How are the rings drawn?

Each ring is two circles: a faint track and an arc whose length is its value as a share of the circle (pathLength="100", so 94.8 draws 94.8 percent). The arc's length is a CSS variable, so the change when you press a toggle button is one transition. The three rings differ in weight (foreground at full strength, 60% and 35%) rather than in colour, and the legend's swatches use the same classes.

How is the chart made accessible?

The rings are decoration. The legend is the text alternative: each row names the metric, its value, its target and whether it is met, and the middle of the chart is real text ("3 of 3 targets met"). A polite status line repeats the count when you press a toggle button, and the toggle buttons are named by their period.

What moves, and what happens with reduced motion?

The arcs grow with a CSS transition and the digits roll like an odometer when you press a toggle button, and the section fades up once when the page loads. With reduced motion, all of it changes in place.

How does it fit on a phone?

The copy comes first, then the figure under a hairline. Inside the figure the ring stacks over the legend, and the toggle wraps under its title if it must. Nothing scrolls sideways at 320 pixels.

What happens in a right-to-left layout?

The ring chart keeps its direction (it starts at the top and runs clockwise in every language). The copy, the legend and the toggle follow the page, and the percentages and targets are wrapped so they don't reorder.

  • Pro

    Gauge Cluster Features

    Metrics and charts

    Three semicircle gauges in one framed band, driven by a single "Simulate load" slider: CPU, memory and queue wait, each with a needle, an arc, a reading and a state.

  • Pro

    Six control cards for a privacy-operations tool, each with a coverage ring counted from the data, a sentence of counts and a Passing or open-items badge.

  • Pro

    Status Ops Board Features

    Metrics and charts

    An error-budget board for an SLO monitor: five services in bands with a budget bar, a 24-point burn sparkline and a status each, a 1h, 6h, 24h and 30d toggle, and a summary counted from the rows.

  • 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 metrics console in a card in a card that follows your theme: six metric tiles with a value, a signed change and a sparkline are the tabs of one tablist, and choosing one opens a larger chart of its series in a strip below.

  • Pro

    Split Stat Overlay Hero

    Stats and live data

    A split hero for a live revenue dashboard: the headline, a checklist and a Shine Button beside a dashboard sketch in a hairline frame, with three stat cards (revenue, users, churn) floating over its edges.