GitHubGitHub
← All widgets
Data / widget

Realtime data table

Sortable, dense metric rows with quality, timestamps, units, and inline trend.

ComfortableCompactStaleMissingLoadingEmpty

Realtime data

5 rows
Quality
Cache hit rate stale% Last value seen: 06/22, 02:40:00 PM missing06/22, 02:40:00 PM
CPU load warning78.4% uncertain06/22, 03:15:00 PM
Queue depth normal3.1k good06/22, 03:25:00 PM
Requests normal428.6/s good06/22, 03:25:00 PM
Response time normal82.1ms good06/22, 03:25:00 PM
<RealtimeDataTable rows={metrics} />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { RealtimeDataTable } from '@chanrg/4ui';<RealtimeDataTable rows={metrics} />

API reference

Props

PropTypeDefaultDescription
rowsMetricRow[][]Generic display rows; no IDs become labels.
densitycompact | comfortablecomfortableVertical density.
labelsPartial<RealtimeDataTableLabels>EnglishColumn headers (name, value, quality, updated), the row/rows counter, and the empty-state title and description.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • Headers remain real table headers.
  • Sort controls are buttons.

Dependencies

Badge, Sparkline, Skeleton, EmptyState