ZUI

Search documentation

Find a page or a heading.

Status indicator

A small decorative dot colored by a semantic status tone (online, offline, busy or idle), hidden from screen readers, which can pulse for a state still in progress unless the system asks for reduced motion.

Installation

bash

The CLI writes components/feedback/status-indicator.tsx, installs Motion and Utils, and adds react-native-reanimated.

Usage

tsx

The dot is hidden from a screen reader, so the text beside it carries the status:

tsx

It is not for an identity colour, and not for an unsaved-changes flag, which is Unsaved indicator.

API reference

StatusIndicator

Takes every prop of React Native's View, plus:

Online fills the dot with success, idle with warning and busy with destructive; offline draws a hollow ring in the muted foreground. pulse fades the dot to half opacity and back on a loop, and it stands still when the system asks for reduced motion. The StatusTone type is exported from the same file.

Differences from the web

  • The web dot sits in a line of text as an inline-block; a device has no inline flow, so place it in a row beside its text.
  • The web's data-tone and data-pulse attributes are not set; a View takes no data attributes.