Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Status Matrix Stats Block for React

Six services by the last eight hourly check windows: passing cells in a foreground tone, degraded cells half filled, a failed cell outlined with a cross and the destructive dot, tooltips and an uptime column.

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 status matrix for React with Base UI. A start-aligned header counts the exceptions, "1 window failed, 5 windows degraded". A framed table follows: six services down the side, the last eight hourly check windows across (7h ago to now) and an uptime column at the end. A passing window is a cell in a foreground tone, a degraded window is half filled, and a failed window is an outlined cell with a cross and the destructive status dot, the only alert in the block. State is always shape and word, never colour alone: every cell says Passing, Degraded or Failed to screen readers and a key sits under the table. Degraded and failed cells are buttons, so a keyboard user can focus them, and each opens a tooltip with the service, the window and what the check saw. Uptime counts a passing window as one and a degraded one as half. All of it is computed from one list of services. On a phone the newest six windows stay and uptime moves under each service's name. For uptime pages, synthetic monitoring and job histories.

FAQ

How do I use my own services?

Edit SERVICES at the top of the file: a name, eight states per service (up, slow or down, oldest first) and an issues list with a note for each window that isn't passing. The headline counts, the uptime column, the cells and the tooltips are computed from them. Change WINDOW_COUNT and headOf if your windows are not hourly.

How is state told without colour?

By shape and word. Passing is a plain tone, degraded is half filled, and failed is an outlined cell with a cross, and every cell contains its word for screen readers. The destructive status dot appears only on the failed cell, as extra emphasis for the one real alert, never as the only signal. The key under the table shows the three looks.

Which cells have tooltips?

The degraded and failed ones, which are buttons you can reach with the keyboard; the tooltip opens on hover or focus and says the service, the window and what the check saw. Passing cells have no tooltip because there is nothing to add; they are plain cells with the word Passing for screen readers. All the information is also in the table and in the uptime column, so a tooltip is only a convenience.

How is uptime computed?

Each service scores one point for a passing window and half a point for a degraded one, then divides by the number of windows and rounds to a tenth of a percent. The caption under the table says so. A service with one degraded window out of eight is 93.8%.

What happens on a phone?

The two oldest windows drop out so the six newest cells stay about 25 pixels wide at 320, the uptime column hides, and each service's uptime moves under its name. Nothing scrolls sideways.

  • Pro

    A triangular retention table of six weekly signup cohorts by months M0 to M5, a percent in every cell in five foreground steps, an average row at the foot and the month-one average in the header.

  • 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

    Four delivery-target tiles you can filter with a segmented control (All, Watch, At risk) that dims the others, each with a bar marked at its watch and at-risk thresholds and a state in a glyph and a word.

  • Pro

    A 26-week contribution grid of daily lessons with month labels, a Less to More key and a band of three counters for the current streak, the longest streak and the active days.

  • Pro

    A seven-day by 24-hour matrix of tiny squares in five foreground steps, with 00, 06, 12 and 18 hour markers, an outlined busiest hour and a readout in the frame's foot.

  • Pro

    A security-posture scanner: eight checks in a hairline grid with a beam that sweeps across it, a Pause scan toggle, and the chosen check's finding, fix and last scan in a band under it.