shadcn.io is not affiliated with official shadcn/ui
Live Ticker Bar Stats Block for React
One divided row of six live readings for a game-server fleet, with a pause control at the end of the row.
Installation
Overview
A live ticker bar for React with Base UI. Beatline, a game-server fleet, is one divided row: a live cell (a dot, the word and a caption), then six readings, value over label, then a pause Button. Players, matches, tick time, worlds, queue and regions advance together on a fixed script once the row is on screen, then hold. Each value is a SlidingNumber. On a phone the six readings scroll inside the row. The heading is there for assistive technology and is not shown. The block is SlidingNumber, Button and Guides. For a game, realtime or operations page, where a strip should sit between taller sections.
FAQ
How do I change the readings?
Edit METRICS at the top of the file. Each metric is an id, a label and a script of readings, and every script is the same length. The row shows the item at the current step. The first item is what the server renders. The sample count in the live cell is the length of that script. There is no socket in the demo.
How do I pause it?
The ghost Button at the end of the row pauses and resumes. While the script can still run, the button is pressed when the feed is paused. After the last sample, or when motion is reduced, the button stays so the row does not shift, and its name says the reading is held or still. Pressing it then does nothing. The choice stays in the page.
Why can't I see a heading?
The row is the whole block, and a visible heading would make it a panel. The heading is in the page for assistive technology: "Beatline fleet", and how many live readings there are. Each reading is a term and a value in a description list named Fleet readings, with the label before the value in the reading order and the value drawn above it.
What does the live word announce?
The word in the first cell (Live, Paused, Held or Still) is a polite live region. It changes when you pause, when the script holds, or when reduced motion keeps the first reading. It does not announce each new number. The sample count under it updates in silence. The dot sends one ring per sample and does not loop.
What happens with reduced motion?
The row stays on the first reading of every metric, the dot does not ping, and the word reads Still. The pause control does not start the script. With motion allowed, the digits roll every two seconds until the script ends.
How does the row work on a phone?
The live cell and the pause button stay put. The six readings sit in a scroller between them, so the row never grows a second line. The scroller can take keyboard focus, because a person who does not use a pointer still needs to move it. From sm the six readings share the row and the scroller only appears when it has to. The row ends the block: there is no padding and no rule under it.
</FaqList>
Related
- Pro
Minimal KPI Bar Stats
KPI bands and tilesFour figures for a bookkeeping tool in cells that share their hairlines from rail to rail, each only a label and a value, under a one-line header that names the period.
- Pro
Weekly Breakdown Bar Chart Stats
Bar and columnA week of screen time as seven cells in one band from rail to rail, each with the day, its time and a meter that fills from the foot, the lightest day marked with a badge; seven rows with horizontal meters on a phone.
- Pro
Metric Tile Row Stats
Hero metricAn asymmetric band of four figures for a property-management tool: one double-width hero cell for rent collected and three small cells for occupancy, arrears and renewals, each with its change on the month before.
- Pro
A shop's orders-today figure that ticks forward at a fixed pace, with a count of orders since the page opened and a pause control.
- Pro
A requests-per-second figure beside three smaller API-edge readings that advance together, live, every five seconds, or paused.
- Pro
Live Indicator Banner
Live statusA heartbeat callout for a monitoring tool: a framed status dot that sends out one ring on each poll, an all-systems-operational heading, a line with how long ago it checked and the p95 latency, and a status-page link.