Connected Account
ConnectedAccount: one account linked at a third-party provider, in a card with the provider's name and logo, a status (connected, pending, expired, disconnected) as a toned StatusPill, facts in a description list, and Connect, Reconnect, Disconnect and Cancel by status, each with pending and error states. While a sign-in waits for approval on the provider it shows your waiting content, like a DeviceCodePrompt, with a Cancel it can also call. Disconnect asks first, and its confirm waits for a person when an agent presses it.
Example
Cloud provider
Waiting for approvalGo to provider.example/device (opens in a new tab) and enter this code.
Code expires in 10:00
Cloud provider
Sign-in expired- Account
- a•••@example.com
- Plan
- Team
- Connected
- Expired
Installation
lucide-reactUsage
One account linked at a third-party provider, in a card: its status, facts like the masked email and the last refresh, and Connect, Reconnect, Disconnect or Cancel by status. While a sign-in waits for approval, put a DeviceCodePrompt in waiting.
API reference
ConnectedAccount
Takes DataAttributes &.
Other exports
connectedAccountConnectedAccountStatusconnectedAccountStatusesuseConnectedAccounttype ConnectedAccountActiontype ConnectedAccountOptionstype ConnectedAccountStatetype ConnectedAccountActionStatetype ConnectedAccountControlstype ConnectedAccountFacttype ConnectedAccountLabelstype ConnectedAccountNoticetype ConnectedAccountPropstype ConnectedAccountProvidertype ConnectedAccountTextAccessibility
- The panel is a group named by the provider's heading; the status is a pill with a dot and its text, so it never rests on colour.
- Each action's button is busy while its Promise runs, and a failure is a live destructive alert.
- Disconnect opens an alert dialog before anything is unlinked.
- A notice is an Alert that isn't live: it describes the account, so a screen reader finds it in reading order instead of being interrupted.
Agent actions
Agents call connect, reconnect, disconnect and cancel on the panel; a status that doesn't offer one fails the step with why. disconnect only opens the confirmation, whose confirm carries data-agent-confirm, so the unlink waits for a person.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.