shadcn.io is not affiliated with official shadcn/ui
Paired Bars Queue Metrics Block for React
Five message queues as rows of paired bars, the release before as an outline and the current release solid, with a three-way switch between throughput, lag and dead letters, and a header that counts the lagging queues.
Installation
Overview
A queue metrics block for React with Base UI. A start-aligned header counts the queues that are lagging from the data ("1 of 5 queues lagging after v3.14") and carries a three-way switch at its end: Throughput, Lag and Dead letters. Under it, one band ruled from rail to rail ends the block: a legend (the release before is an outline, the current release is solid) and a row per queue with its name, what it carries, a pair of bars on a shared scale for the chosen measure, the current value rolling in place and a signed change on the release before. Switching redraws every bar with a CSS transition and announces the measure; the values are always in text, so the bars add shape and nothing else. The one lagging queue takes a warning dot and says "lagging" in words. It's built from Segment Group, Sliding Number, Status and Guides, with your theme's tokens for every colour.
FAQ
How do I change the queues, the measures or the limit?
Edit QUEUES (each has an id, a one-line note and its [before, now] readings for every measure, in the order of METRICS), METRICS (label, unit and the step the scale rounds up to) and LAG_LIMIT in seconds. Each measure's scale is its largest reading rounded up to the step, the bars are shares of it, and the count in the title is the number of queues whose lag now is above the limit, so nothing is kept in step by hand. The numbers are example data.
Why does a queue with no dead letters show no bar?
A bar of zero length would still draw its outline as a sliver, which reads as a small value. A zero is no bar, and the number beside it says 0 and the change says what it was.
How does it read without the bars?
Each row is a list item with the queue's name as a heading, its note, the current value and the signed change with a hidden sentence ("on v3.13, from 640 msg/s"). The bars are decoration and hidden from assistive technology. The switch is a radio group; a polite status line says which measure is showing.
What changes on a phone?
The switch moves under the header and each queue's bars go under its name, full width, with the value still at the end of the name line. The legend wraps and the measure's name drops out. Nothing scrolls sideways at 320 pixels.
Related
- Pro
Segmented Bar Latency Budget
Metrics and chartsA single bar that slices a 250 ms request budget by hop (edge, auth, database, render), a switch between two releases that re-slices it, and a four-cell band with each hop's milliseconds and its change.
- Pro
Percentile Ruler Load Test Results
Metrics and chartsThree load test runs on one 0 to 800 ms ruler: a line from p50 to p99 with marks at p50, p95 and p99 and a shared SLO line, beside each run's requests per second, error rate and a Pass or Fail badge.
- Pro
Release Pins Service Health Dashboard
Incidents and uptimeA health board for a hosting product: four service lanes of thirty daily cells, with a row of release pins above them that open a card of what shipped, and the month's uptime at the end of each lane.
- Pro
Grouped Bar Chart Stats
Bar and columnTwo bars per month, this year solid and last year lighter, with a Chart and Table switch that swaps the drawing for a real table of the same numbers in the same box.
- Pro
Status Ops Board Features
Metrics and chartsAn 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
Tabbed Window Uptime History
Incidents and uptimeA tabbed window of ninety-day uptime for an uptime monitor: one tab per service, a large uptime figure that rolls to the new service, a strip of ninety daily bars and a three-row table of incidents.