Realtime stream
A live feed of events arriving, with rate and recent history.
| Time | Value |
|---|---|
| 27s | 177.1796140469586 |
| 27.5s | 150.72287459973344 |
| 28s | 158.18231172823937 |
| 28.5s | 147.60062765006487 |
| 29s | 135.3601626254265 |
| 29.5s | 144.45932769370106 |
| 30s | 117.5857935766834 |
| 30.5s | 135.99813725312964 |
| 31s | 110.66565006044807 |
| 31.5s | 121.83429159721818 |
| 32s | 113.88811642637388 |
| 32.5s | 107.50542678310396 |
| 33s | 121.17836188029085 |
| 33.5s | 100.95329193882887 |
| 34s | 125.94626838040782 |
| 34.5s | 106.99959540250201 |
| 35s | 126.04038728702513 |
| 35.5s | 123.81938414954975 |
| 36s | 125.17317799718484 |
| 36.5s | 143.98897536808957 |
| 37s | 129.79237198115044 |
| 37.5s | 254.37422557961256 |
| 38s | 143.73011270148086 |
| 38.5s | 166.34665807877812 |
| 39s | 164.60974725907465 |
| 39.5s | 167.59648155211866 |
| 40s | 184.72286017406708 |
| 40.5s | 169.31013459627613 |
| 41s | 195.8303820202624 |
| 41.5s | 175.86882069053553 |
When to use
- Watching incoming events, requests or trades as they happen.
- The user needs to see bursts and quiet periods.
When not to use
- Data refreshes only now and then; a static chart is calmer.
- The numbers must be read exactly.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/realtime-stream
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
RealtimeStream
10 props
PropTypeDefaultDescription
label *string—
points *readonly StreamPoint[]—Oldest first, `t` in seconds.
windowSecondsnumber60
unitstring""
thresholdnumber—
domainreadonly [number, number]—Fixed vertical range. Default fits the data.
formatValue((value: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes img and status semantics, with aria-label, aria-busy, aria-hidden and aria-pressed kept in step with state. Changes that matter are announced through a live region.
Motion
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/realtime-stream.mdThe index of every part is at /llms.txt.