Approval Card
The agent asks, you answer: single and multiple-choice questions with an optional custom answer, stepped through one at a time with a progress strip, ending in a summary of your choices.
- Category: React AI Chat and Agent Components
- Licence: Charcoal UI Pro
- Built with: React 19, Tailwind CSS 4, Motion
- Dependencies: motion, clsx, tailwind-merge
Examples
Approval Card
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | |
questions | { question: string; options: string[]; multiple?: boolean; allowOther?: boolean }[] | — | |
onComplete | (answers: string[][]) => void | — |
About Approval Card
Approval Card lets an agent ask before it acts: single and multiple-choice questions, an optional custom answer, stepped through one at a time with a progress strip, ending in a summary of what you chose.
Approval Card is an AI interface component for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.
When to use Approval Card
- Agents clarifying a vague request.
- Plan approval before a long run.
- Guided setup inside a chat.
- Preference capture for recommendations.
How it works
Each question is a radio group or checkbox group with full keyboard support. Steps slide between each other, the custom answer reveals a text field, and the final summary is passed to your onComplete handler.
Streaming and status changes go through live regions, every action is a labelled button that works from the keyboard, and decorative motion stops for people who prefer reduced motion. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.
Customizing Approval Card
Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.
Style it with className like any other element. It only uses your theme's tokens, so it follows light and dark mode without extra work.
- title (string).
- questions.
Goes well with Approval Card
These ai pieces share its tokens and motion language, so they sit together on one page without clashing.
- Typing Indicator: A React typing indicator: a bubble with rippling dots that tells screen readers who is typing
- Thinking Orb: A React AI thinking orb with nine motions for nine kinds of busy
- AI Prompt Input: An animated React AI chat input: growing field, attachments, model picker and a stop button
- Voice Input: A React voice input: the mic expands into a live waveform with a timer and cancel
- Message Scroller: A React chat viewport that follows streaming text and lets go when you scroll up
Install Approval Card
npx shadcn@latest add @charcoal/approval-cardApproval Card is part of Charcoal UI Pro. One seat unlocks all 393 Pro components, 112 landing-page sections and 100 full templates, for every personal and client project, with updates included. Add the @charcoal registry once with your access token, then the command above copies approval-card.tsx into components/ui and installs clsx, tailwind-merge.
You own the file you install: no runtime package, no lock-in, nothing to keep in sync. Change it however your product needs.
See Charcoal UI Pro pricing · Pro setup
Frequently asked questions
- How do I install Approval Card?
- Approval Card is part of Charcoal UI Pro. Add the @charcoal registry to components.json with your access token, then run npx shadcn@latest add @charcoal/approval-card. It copies approval-card.tsx into components/ui and installs motion, clsx, tailwind-merge.
- Is Approval Card free for commercial use?
- Approval Card needs a Charcoal UI Pro seat, monthly or a one-time lifetime price. A seat covers unlimited personal and commercial projects, including client work, and every future Pro component.
- Does Approval Card work with Next.js?
- Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
- Can an AI coding agent install Approval Card?
- Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Approval Card's props and get_install_command returns the exact command.