Components / AI components / Review & permissions
Human reviewExperimental alpha

ApprovalCard

A clear decision before a consequential action.

ApprovalCard preview

Review required

Archive 3 inactive accounts

Pending

CRM sandbox · Demo workspace · accounts:archive · medium risk

3 accounts become read-only. An administrator can restore them.

Interactions use local sample data.

Usage and props

Show an action for review before sending a decision to your server. Keep the proposal version and action digest with the request, and track execution separately from the decision receipt. Authenticate, recheck scope/version/expiry, deduplicate and execute on the server.

proposalApprovalProposal
The action details, scope, version, digest, status and expiry from your server.
submissionSubmissionState
The decision request state. Keep it separate from proposal.status.
onDecision(decision: 'approve' | 'reject', proposal: ApprovalProposal) => void
Send the chosen decision for this proposal and update submission from the result.
staleboolean (optional)
Disables decisions when the displayed proposal may be out of date.
errorstring (optional)
The decision failure to show. The card does not infer a result from a click.
onReconcile() => void (optional)
Look up the original decision after an unknown outcome before trying again.
How state and callbacks work

These are the main props for the example. The package's TypeScript declarations include the full API.

Customize and use with a keyboard