Live line Pro
Get Pro at $9
One payment, every Pro piece. $10 tomorrow.
Install
npx shadcn@latest add @mu-pro/live-linePro. Installs with your licence key through the @mu-pro registry; the key comes with Pro. Lands in components/mu/live-line/ with the shared foundation.
Usage
import { LiveLine } from "@/components/mu/live-line/LiveLine";
<LiveLine points={points} label="POST /v1/charges" unit="rps" window={60} />Source
How it works
Building with an agent? Hand it a ready prompt for this piece.
Input and reduced motion
- Pointer / touch / keyboard: none; it is a reading. The words in the header, key and foot are text a screen reader reads.
- Reduced motion: no scroll between points and no flare: each point redraws the line once, at its new place; the title still swaps its words.
- Off screen or in a hidden tab the frame loop does not run; points still land, and the line jumps to now when it is seen again.
Props
| Prop | Default | What it does |
|---|---|---|
points | — | { t, v }[], oldest first | the readings (t in ms since the epoch); append as data arrives, and an older or empty array starts over |
subscribe | — | (push) => cleanup | or a stream: called once with push(point \ | points) |
window | 60 | seconds | history across the line; the ages under it are its quarters |
format | compact, 1 decimal | Intl.NumberFormatOptions or (v) => string | how a value reads |
unit | — | text | after every value ("rps") |
label | "Traffic" | text | the title |
caption | "Requests" | text | the small caps word before Live |
threshold | — | number | a dashed alert line; above it the caps say "Over …" |
failed | — | true or text | the stream failed: the line dims, the caps say Offline, the title says why |
size | "md" | "md", "sm" | the panel, or a sparkline row |
onPeak | — | (point) => void | once per new peak, as it reaches now |
labels | English | Partial<LiveLineLabels> | every word, as templates ("Peak · {v}") |
className | — | — | added to the root |
Sound
None. It loads in silence.
None: it is watched, not pressed.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.
Live traffic as one glowing line: it scrolls left as data arrives, now sits at the right edge, and a new peak flares once.
For live traffic and realtime metricsMore in Data & live