Skip to content
nexubDesign System
v11.9.0

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';
View as Markdown

Playground

Props

Send 3 payment reminders to Acme

Invoices INV-1042, INV-1051 and INV-1063, $4,120 in total, to ap@acme.example.
TSX
<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

Send 3 payment reminders to Acme

Invoices INV-1042, INV-1051 and INV-1063, $4,120 in total, to ap@acme.example.

Props

Props
PropTypeDefaultDescription
titlerequiredstring—What the agent wants to do.
onApprove(() => void)—Called once with the choice.
onDeny(() => void)—Called once with the choice.
approveLabelstring'Approve'
childrenReact.ReactNode—Details: who, how much, what changes.
denyLabelstring'Deny'

Accessibility

Screen reader

  • The outcome is announced in a polite live region and replaces the buttons.

On iOS & Android