Skip to content
Uxelith
Sign in
Prov1.0.0AI & Agents

Approval Card

The moment an AI agent asks before acting: what it wants to do, why, and exactly what will happen. Approve is held for a beat so it's never an accident; Deny is one press. Then it folds into a one-line record.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
28 Oct 2026
Live

Installation

Usage

example.tsx
"use client"

import { ApprovalCard } from "@/components/approval-card"

export function SendEmailApproval() {
  return (
    <ApprovalCard
      title="Send an email to 3 people?"
      description="The agent wants to email your team."
      onApprove={() => console.log("approved: resume the agent run")}
      onDeny={() => console.log("denied: tell the agent to stop")}
    >
      <p>To: priya@acme.co, arjun@acme.co, meera@acme.co</p>
    </ApprovalCard>
  )
}

Props

PropTypeDefaultDescription
titleReactNode—The question, as the agent would ask it.
descriptionReactNode—Why it is asking.
childrenReactNode—What will happen if approved: recipients, amounts, a diff.
status"pending" | "approved" | "denied"—Controlled status; leave it out and the card keeps its own.
onApprove() => void—Called on approval.
onDeny() => void—Called on denial.
holdDurationnumber900Milliseconds Approve must be held; 0 makes it a plain click.
approveLabelstring"Approve"The approve verb.
denyLabelstring"Deny"The deny label.
actionsReactNode—Extra buttons, such as Edit first.
keyboardbooleantrueEnter approves and Escape denies while pending, unless focus is in another field.
...propsHTMLAttributes<HTMLElement>—Any section attribute.

Accessibility

  • It announces itself politely when it appears, with the keys to press, and announces the decision.
  • A keyboard press on Approve approves at once; holding is only for pointers.
  • Enter and Escape never act while someone is typing in another field.

Changelog

  1. v1.0.0Latest

    First release.

More in AI & Agents

All 4 in AI & Agents
  • AI & AgentsPro

    Plan Timeline

    An AI agent's plan as it works through it: the current step pulses, a step waiting on you turns amber, finished steps tick and the line fills down to the next, so you see where it is at a glance.

  • AI & AgentsPro

    Streaming Answer

    An AI answer that arrives like writing: tokens come in bursts but words appear at a steady pace, each sharpening into place behind a caret, after a Thinking shimmer. Light markdown; sentences announced to screen readers.

  • AI & AgentsPro

    Tool Call

    One step an AI agent took: the tool, what it sent and what came back. Queued, running with a light sweeping its edge, done with a self-drawing tick and the time taken, or failed. Opens to show arguments and the result.