审批卡片

New

人机协同决策面:批准/拒绝/修订,以及单选、多选、自由文本或多步问题;提交后折叠为已记录结果。

提问澄清

index.tsx

引导用户完成单选、多选与自由文本问题,再把完整回答交回 Agent。

How focused should the first release be?

1/3
Question 1 of 3

API 参考

title?
ReactNode
Approval required
description?
ReactNode
questions?
ApprovalCardQuestion[]
[]
status?
"pending" | "approved" | "submitting" | "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

审阅批准

index.tsx

暂停 Agent 流程等待批准、修订或拒绝,并折叠为已记录的决策结果。

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 参考

title?
ReactNode
Approval required
description?
ReactNode
questions?
ApprovalCardQuestion[]
[]
status?
"pending" | "approved" | "submitting" | "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

安装

用 shadcn CLI 添加,或手动复制源码。

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

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.