Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/ConnectionStatus

ConnectionStatus

The state of a connection your app reports: connected, connecting, degraded or disconnected.

Live

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add connection-status

Dependencies

What add connection-status installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

Examples

2 examples · 1 component
connection-status
Live · 42 msReconnecting…DegradedDisconnected

States

The four statuses; children adds detail.

connection-status
Live

Driven by the socket

The status follows the socket's events; a drop retries with backoff.

API reference

Forwards props and ref to the container element; it only adds composition utilities.

PropTypeDefault
status

What your app knows about the connection; you own the transitions.

"connected" | "connecting" | "degraded" | "disconnected"—
children

Replaces the default English label: translations or detail like "Reconnecting…" or "Live · 42 ms".

ReactNodethe status label

States

The states that apply to this component and their visual treatment.

StateTreatment
connectedA success dot.
connectingA pulsing warning dot; use children for "Reconnecting…".
degradedA steady warning dot: reachable but slow or partially failing.
disconnectedAn error dot.

Accessibility

A role="status" live region that stays mounted: changes are announced politely without moving focus. Every text change is announced, so keep per-second countdowns or live latency out of children.

The text states the connection; the dot's color only reinforces it, and its pulse stops with reduced motion.

Feed it from real signals (WebSocket open/close, a health endpoint, failed requests). navigator.onLine only says the device has a network, not that your service answers.

If losing the connection blocks work, also say what still works and what to do (an Alert or a disabled Save with a reason); the indicator alone is easy to miss.

Server-safe: no client JavaScript of its own.