Skip to content
Get Pro

Connection State

Clear connected, reconnecting, resumed, and offline states for resumable agent streams.

Reconnecting

The run continues safely on the server

Installation

Add the component source directly to your project.

pnpm dlx shadcn@latest add https://pastaui.com/r/connection-state.json

API reference

Connection State

Connection State properties
PropTypeDefaultDescription
stateconnected | offline | reconnected | reconnectingSelects the connection state and message.
detailstringAdds recovery or server-state context.
onRetry() => voidRetries an offline connection.