Confirmation
Human-in-the-loop approval gate for agent actions. Pauses tool execution until the user approves or rejects — the standard pattern for destructive operations.
npx @slipstream-ui/cli@latest add confirmationApproval gate
Delete all files in /tmp?
PendingThis affects 14 files and cannot be undone.
delete_files
Decisions so far: none
Color variants
Destructive action
PendingVariant sets the pending card accent; the result chip still encodes the outcome.
Info gate
PendingNeutral blue accent for non-risky pauses.
Success flow
PendingGreen accent for confirm-to-continue steps.
Warning (default)
PendingThe default amber accent — same as omitting variant.
Buttons: wording, styling, visibility
Publish release v0.9.0?
PendingCustom wording and destructive approve styling.
Read-only gate
PendingshowActions hides the buttons — pair with a controlled status driven by your own UI.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Summary of the action requiring approval. |
| description | string | — | Detail: affected resource or risk note. |
| toolName | string | — | Tool name shown as mono text. |
| status | 'pending' | 'approved' | 'rejected' | 'pending' | Controlled outcome; omit for uncontrolled. |
| variant | 'default' | 'warning' | 'destructive' | 'info' | 'success' | 'default' | Accent color of the pending card; outcome chips always follow the result. |
| approveVariant | 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | 'default' | Button variant for the approve action. |
| rejectVariant | 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | 'outline' | Button variant for the reject action. |
| showActions | boolean | true | Hide the action buttons (controlled-only gate; status drives the chip). |
| labels | { approve?, reject?, approved?, rejected? } | — | Wording overrides for the buttons and outcome chips. |
| onApprove | () => void | — | Called on approval. |
| onReject | () => void | — | Called on rejection. |
| labels | object | — | Label overrides for localization. |
Accessibility
- Pending state renders role=alertdialog labeled by the title.
- Outcome chip announces Approved/Rejected.
- Never auto-approve on timeout — keep waiting or fail explicitly.
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.