Approvals
Cards that ask the user to allow or deny an action, with a risk label.
Delete 3 stale snapshot files
These files are no longer referenced by any test. Deleting them cannot be undone from here.
- tests/__snapshots__/table.old.snap
- tests/__snapshots__/tree.old.snap
- tests/__snapshots__/thread.old.snap
Approval needed: Delete 3 stale snapshot files
When to use
- An agent wants to run a tool that changes something.
- The decision should be explicit and reversible where possible.
When not to use
- The action is harmless and routine; do not interrupt.
Installation
pnpm dlx shadcn@latest add @caliper/approvals
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ApprovalCard
12 props
ToolApproval
10 props
RiskChip
1 prop
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes status and alert semantics, with aria-hidden, aria-label and aria-expanded kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/approvals.mdThe index of every part is at /llms.txt.