Components
← All components

Network Status

stimeo--network-status

Detects online/offline and toggles a live-region banner on change.

The stimeo--network-status controller reads navigator.onLine on connect and subscribes to the window online / offline events, toggling the matching banner. The offline banner is role="alert" (assertive) because losing connectivity is urgent; the recovery banner is role="status" (polite). To make the announcement reliable across assistive tech, the controller re-writes the banner's text on each transition, guarded so an unchanged state never re-announces, and can auto-hide the recovery banner after onlineAutoHide. navigator.onLine is the browser's guess — it does not guarantee server reachability. It dispatches stimeo--network-status:change, and listeners/timers are removed on disconnect (Turbo included). Behavior only — banner styling is owned by this Playground.

running

These buttons dispatch the window online / offline events so you can see the behavior without actually disconnecting.