Agentic control
Approval card
Use when the agent has stopped at a fork and needs the user to pick one path before it continues.
Human-in-the-loop question before the agent acts.
Part of Agentic control. The stage where the agent stops answering and starts doing. It covers the whole handover: agreeing what the agent may do, watching it work, stepping in, and checking what changed afterwards. Reach for these as soon as an action touches a customer, money or a record.
Do
- Ask one question and offer two to four options the agent can carry out straight away.
- Give each option a second line with its consequence, so the choice is informed.
- Keep Skip available. Holding is a valid answer.
Don't
- Don't preselect an option. Approve stays disabled until the user chooses.
- Don't style the pause as a warning or an error. The agent is waiting, nothing is broken.
- Don't stack several approval cards. Batch the decisions into a plan.
States
- Paused: The question, the options, and a Paused badge. Approve is disabled until an option is chosen.
- Option selected: The chosen row takes the accent ring and Approve becomes active.
- Approved: The card collapses to a confirmation naming the chosen option, with a Resumed badge.
- Skipped: The card collapses to a neutral line saying nothing was changed, with an On hold badge.
Usage
import { ApprovalCardPattern } from "./halaska-kit";
<ApprovalCardPattern
question="How should I reply to Acme's outage complaint?"
options={[
{ id: "workaround", title: "Reply now with a workaround", sub: "Unblocks Acme today" },
{ id: "wait", title: "Wait for the fix to ship", sub: "Priya's patch lands Thursday" },
]}
onApprove={(option) => resume(option.id)}
onSkip={() => hold()}
/>
ApprovalCardPattern props
eyebrowstring(default "Needs your call"): Small caption beside the agent glyph (default: "Needs your call")badgeLabelstring(default "Paused"): Status badge text while paused (default: "Paused")questionstring(default "How should I reply to Acme's outage complaint?"): The question the agent is asking (default: "How should I reply to Acme's outage complaint?")options{ id: string, title: string, sub?: string }[](default APPROVAL_OPTIONS): Radio-row choices (default: APPROVAL_OPTIONS)approveLabelstring(default "Approve"): Primary button label (default: "Approve")skipLabelstring(default "Skip"): Ghost button label (default: "Skip")approvedTextstring | ((option) => string)(default APPROVAL_APPROVED_TEXT): Headline of the approved state; a function receives the chosen option (default: `Approved · ${option.title}`)skippedTextstring(default APPROVAL_SKIPPED_TEXT): Headline of the skipped state (default: "Skipped · nothing was changed")onSelect(option) => void: Fires when a radio row is pickedonApprove(option) => void: Fires when Approve is clicked, with the chosen optiononSkip() => void: Fires when Skip is clicked
Built from
Agent Glyph, Badge, Button, Card, Radio Group, Stack, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install