Approval Card

A human-in-the-loop decision surface for approvals, single or multiple-choice questions, custom responses, and multi-step review flows.

Questions

index.tsx

Guides the user through single-choice, multiple-choice, and freeform questions before returning the completed response to the agent.

How focused should the first release be?

1/3
Question 1 of 3

Review and Approve

index.tsx

Pauses an agent workflow for approval, revision, or rejection and collapses into the recorded decision.

Publish the component update?

Input required

The agent has prepared the release and is waiting for your decision.

Release
approval-card
Checks
4 passed
Visibility
Public registry

API Reference

title?
ReactNode
Approval required
description?
ReactNode
questions?
ApprovalCardQuestion[]
[]
status?
"pending" | "submitting" | "approved" | "rejected" | "changes-requested" | "answered"
pending
answers?
ApprovalCardAnswers
defaultAnswers?
ApprovalCardAnswers
{}
onAnswersChange?
((answers: ApprovalCardAnswers) => void)
step?
number
defaultStep?
number
0
onStepChange?
((step: number) => void)
onSubmit?
((answers: ApprovalCardAnswers) => void)
onApprove?
(() => void)
onReject?
(() => void)
onRequestChanges?
(() => void)
onDismiss?
(() => void)
approveLabel?
ReactNode
Approve
submitLabel?
ReactNode
Submit response
result?
ReactNode
className?
string

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/approval-card

Composition

Place the approval surface inside the message that pauses the agent run.

Message
└── MessageContent
    └── ApprovalCard

Note: Tool Approval handles the narrower case of one tool permission. Message places the decision inside the conversation history. Todo List shows which planned work is paused by the decision.

How it works

Human-in-the-loop work is a temporary transfer of control. The card should state the decision clearly, collect only the required input, and return a durable answer to the paused agent run.

Updated