Skip to content

Realtime Components

Components for displaying realtime connection status and live data.


ConnectionStatus

Displays realtime connection status indicator.

Props

PropTypeDefaultDescription
status'connected' | 'connecting' | 'disconnected'RequiredConnection status
mode'realtime' | 'polling' | 'offline'-Connection mode
size'sm' | 'md''md'Size variant
showLabelbooleantrueShow status label
customLabelsRecord<string, string>-Custom status labels
classNamestring-Container class

Example

tsx
<ConnectionStatus
  status="connected"
  mode="realtime"
  size="sm"
/>

LiveCounter

Animated numeric counter with trend indicator.

Props

PropTypeDefaultDescription
valuenumberRequiredCurrent value
previousValuenumber-Previous value for trend
durationnumber1000Animation duration (ms)
prefixstring-Value prefix
suffixstring-Value suffix
decimalsnumber0Decimal places
showTrendbooleantrueShow trend indicator
classNamestring-Container class

Example

tsx
<LiveCounter
  value={1234}
  previousValue={1200}
  prefix="$"
  showTrend
/>

See also