Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Segmented Job Queue Stats Block for React

A background-job table where each queue's depth is a bar split into waiting, running and retrying, with the backlog total in the header.

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 queue table for React with Base UI. Queueford, a background-job product, opens with the backlog: every job that is waiting, running or retrying, summed in the header, with a key for the three states at the end of the row. Under it, six queues run from rail to rail and end the block. A row is a monospace name, the worker as an outlined badge, a depth bar segmented by state, and the rate. Waiting is full weight, running lighter, retrying lightest, and each segment's width is its count, so the three shares add up to the depth. Duration has its own column from md and sits under the name below that. It's built from Table, Badge and Guides. The bar is CSS, not a chart, and it uses the foreground colour at three weights.

FAQ

How do I change the queues?

Edit QUEUES at the top of the file. A queue has a name, a worker, waiting, running and retrying counts, a rate in jobs per minute, and a duration in milliseconds. The backlog in the header is the sum of every waiting, running and retrying count. A duration under a second is shown in milliseconds; a longer one is shown in seconds.

How is the depth bar split?

The bar is one track. Each state with a count above zero takes a share of it equal to that count, with a hairline gap between segments, so the widths add up to the row. A state at zero is left off the bar and still named in the text ("0 retrying"). The key for the three weights is written once, in the header.

Why aren't the states green, amber and red?

Waiting, running and retrying are states, not a verdict. They differ by weight of the same foreground colour, and the counts are written under the bar, so the row still reads without colour and in every theme.

Is the table accessible?

Yes. The table is named, each column has a header, and the queue name is the row header. The bar is decorative because the waiting, running and retrying counts are written out under it. The worker is a badge with its name as text. Values sit in bdi elements, and the queue name and the duration are kept left to right. The table is a native table.

How does it fit on a phone?

The duration column drops out below md, and the row names it under the queue ("Average 1.4 s"). The rate column drops out below sm and the same line names it ("180 / min"). The name, the worker and the depth stay. Nothing scrolls sideways at 320 pixels.

Why is there no line under the table, and what moves?

The table ends the block. On a page, the next section draws its own top rule along the band's foot, so a bottom border here would double it, and the column has no bottom padding for the same reason. The header fades up once when the page loads. The table does not, because on a phone it can start below the fold. With reduced motion the header simply appears.

  • Pro

    A gateway usage table where each route shows calls, error rate, a p50-to-p99 latency range on one scale, and a bar for its share of the rate limit.

  • Pro

    A log-analytics table of five severity levels with the count, the lines a minute, and a bar whose length is the logarithm of the count, plus a filter that dims the quieter levels.

  • Pro

    A table of services in a tinted frame with sortable column heads, 30-day uptime strips, response times and error rates, and a mark and a word on any service that is down.

  • Pro

    Twelve weeks of support tickets stacked by priority in three foreground weights, with toggles that double as the legend: switch a priority off and the stack, the scale and every total re-read.

  • Pro

    A sales pipeline as five chevrons as wide as the deals in each stage, in deepening weights, with the deals and their value in a cell under each and the stage worth the most picked out.

  • Pro

    Quota Tile Grid Stats

    Goals and progress

    Six plan-quota tiles (seats, API calls, storage, projects, bandwidth, builds) with used against limit, a bar, what is left and a reset hint in days; a tile at 90% or more gets a solid bar and an Upgrade link badge.