Components · AI
Approval Card
BetaAdded v4.8.0
The agent asks before it acts: what will happen, then Approve or Deny.
import { ApprovalCard } from '@nexub/react';Playground
Props
Send 3 payment reminders to Acme
Invoices INV-1042, INV-1051 and INV-1063, $4,120 in total, to ap@acme.example.
<ApprovalCard approveLabel="Send reminders" title="Send 3 payment reminders to Acme">Invoices INV-1042, INV-1051 and INV-1063, $4,120 in total, to ap@acme.example.</ApprovalCard>Examples
Before sending
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| titlerequired | string | — | What the agent wants to do. |
| onApprove | (() => void) | — | Called once with the choice. |
| onDeny | (() => void) | — | Called once with the choice. |
| approveLabel | string | 'Approve' | |
| children | React.ReactNode | — | Details: who, how much, what changes. |
| denyLabel | string | 'Deny' |
Accessibility
Screen reader
The outcome is announced in a polite live region and replaces the buttons.
On iOS & Android
Web only
Approval Card has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.