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.
Installation
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.
Related
- Pro
Cohort Retention Table Stats
HeatmapsA 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 tilesSix 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
Threshold Target Cards Stats
Goals and progressFour 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
Activity Streak Stats
HeatmapsA 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
Hourly Matrix Heatmap Stats
HeatmapsA 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
Scanner Beam Sweep Grid Features
Metrics and chartsA 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.