Skip to content
caliper ui docs

Pro

Realtime stream

A live feed of events arriving, with rate and recent history.

Pro
pnpm dlx shadcn@latest add @caliper/realtime-stream

Checkout API

Production, us-east. On-call is paged above 230 ms.

API latency p95Live176 ms
limit 230 ms

API latency p95
TimeValue
27s177.1796140469586
27.5s150.72287459973344
28s158.18231172823937
28.5s147.60062765006487
29s135.3601626254265
29.5s144.45932769370106
30s117.5857935766834
30.5s135.99813725312964
31s110.66565006044807
31.5s121.83429159721818
32s113.88811642637388
32.5s107.50542678310396
33s121.17836188029085
33.5s100.95329193882887
34s125.94626838040782
34.5s106.99959540250201
35s126.04038728702513
35.5s123.81938414954975
36s125.17317799718484
36.5s143.98897536808957
37s129.79237198115044
37.5s254.37422557961256
38s143.73011270148086
38.5s166.34665807877812
39s164.60974725907465
39.5s167.59648155211866
40s184.72286017406708
40.5s169.31013459627613
41s195.8303820202624
41.5s175.86882069053553
Installs components/ui/realtime-stream.tsxDepends on @radix-ui/react-slot, d3-shape, lucide-reactMotion honours reduced motion

When to use

Use it for

  • Watching incoming events, requests or trades as they happen.
  • The user needs to see bursts and quiet periods.

Skip it when

  • 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 4 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.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { RealtimeStream } from "@/components/ui/realtime-stream"

The worked example comes with Pro

The 35-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

RealtimeStream

component
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—

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.

No custom key handling; Tab and the native activation keys do the work.

Motion

It checks prefers-reduced-motion itself and settles immediately instead of travelling. Every state is still reachable.

All Advanced charts examples