ConnectionStatus

Markdown

Whether you’re connected, with the reconnect and catch-up actions your app supports.

Used in Recoverable chat and Agent Workbench.

Use it for
The connection state with reconnect and replay actions.
Not for
A run state. Try StatusBadge or BackgroundStatus.

ConnectionStatus preview

Loading example…

Installation

npm install @stackunseen/ui
import { ConnectionStatus } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Usage and props

Show connection state alongside the freshness of the displayed data. Your application supplies both and handles recovery requests; keep completed actions visible during a connection loss. Only offer the recovery actions your connection really supports. Asking to reconnect isn’t the same as being reconnected, and it never starts a new run.

valueConnectionInfo
Whether you’re connected, how fresh the data is, which recovery actions your connection supports, and where to resume from.
submissionSubmissionState (optional)
The recovery request state. Defaults to idle; track unknown outcomes explicitly.
onResume(cursor: RecoveryCursor) => void (optional)
Ask your server to pick up where it left off, when your connection supports it.
onRefresh() => void (optional)
Ask for fresh data, when your connection supports it.
errorstring (optional)
The recovery failure to show alongside the retained connection state.
variant'banner' | 'card' | 'compact' (optional)
Choose a presentation for the available space. Defaults to banner.
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
value: ConnectionInfo · submission? · onResume? · onRefresh?
Keeps honest
Only offer the recovery actions your connection really supports. Asking to reconnect isn’t the same as being reconnected, and it never starts a new run.
MCP
read_component "ConnectionStatus" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Tab reaches available recovery actions and connection details. Enter or Space activates an action or opens the details.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio