BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/beui/approval-card

Approval Card

beui/approval-card
FreeComponent

A human-in-the-loop decision surface for approvals, single or multiple-choice questions, custom responses, and multi-step review flows.

Install it

npx shadcn@latest add https://beui.dev/r/approval-card.json

Source

components/agents/approval-card/index.tsxbeui.dev/r/approval-card.json · first 6 KB
1"use client";
2// beui.dev/components/agents/approval-card
3
4import {
5 ArrowLeft,
6 ArrowRight,
7 Check,
8 CircleHelp,
9 LoaderCircle,
10 MessageSquareText,
11 X,
12} from "lucide-react";
13import { AnimatePresence, motion, useReducedMotion } from "motion/react";
14import { useCallback, useEffect, useRef, useState } from "react";
15import { AgentDisclosure } from "@/components/agents/agent-disclosure";
16import { ActionSwapRollText } from "@/components/motion/action-swap-roll";
17import { Button } from "@/components/motion/button";
18import { Checkbox } from "@/components/motion/checkbox";
19import { Input } from "@/components/motion/input";
20import { RadioGroup, RadioGroupItem } from "@/components/motion/radio";
21import { EASE_OUT, SPRING_SWAP } from "@/lib/ease";
22import { cn } from "@/lib/utils";
23import type {
24 ApprovalCardAnswer,
25 ApprovalCardAnswers,
26 ApprovalCardProps,
27 ApprovalCardQuestion,
28 ApprovalCardStatus,
29} from "./types";
30
31export type {
32 ApprovalCardAnswer,
33 ApprovalCardAnswers,
34 ApprovalCardOption,
35 ApprovalCardProps,
36 ApprovalCardQuestion,
37 ApprovalCardStatus,
38} from "./types";
39
40const EMPTY_ANSWER: ApprovalCardAnswer = { selected: [], custom: "" };
41
42function getStatusLabel(status: ApprovalCardStatus) {
43 if (status === "submitting") return "Submitting";
44 if (status === "approved") return "Approved";
45 if (status === "rejected") return "Rejected";
46 if (status === "changes-requested") return "Changes requested";
47 if (status === "answered") return "Response submitted";
48 return "Input required";
49}
50
51function getStatusClass(status: ApprovalCardStatus) {
52 if (status === "approved" || status === "answered") {
53 return "text-emerald-600 dark:text-emerald-400";
54 }
55 if (status === "rejected") return "text-rose-600 dark:text-rose-400";
56 if (status === "changes-requested") {
57 return "text-amber-600 dark:text-amber-400";
58 }
59 return "text-muted-foreground";
60}
61
62function getStatusBadgeClass(status: ApprovalCardStatus) {
63 if (status === "pending" || status === "changes-requested") {
64 return "border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400";
65 }
66 if (status === "submitting") {
67 return "border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400";
68 }
69 if (status === "approved" || status === "answered") {
70 return "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";
71 }
72 return "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-400";
73}
74
75// … truncated

What it pulls in

npm packages

  • clsx
  • lucide-react
  • motion
  • tailwind-merge

Files it writes

  • components/agents/approval-card/index.tsx
  • components/agents/approval-card/types.ts
  • components/agents/agent-disclosure.tsx
  • components/motion/action-swap-roll.tsx
  • components/motion/button/index.tsx
  • components/motion/checkbox.tsx
  • components/motion/input.tsx
  • components/motion/radio.tsx
  • lib/ease.ts
  • lib/utils.ts
  • components/motion/action-swap.tsx
  • components/motion/button/base.tsx
  • components/motion/button/magnetic.tsx
  • components/motion/button/stateful.tsx
  • lib/hooks/use-hover-capable.ts
  • components/motion/magnetic.tsx

Facts

Registry
beui
Type
registry:component
Access
Free
Files written
16
Licence
the repository states none
First indexed
2026-08-12
Last confirmed
today

Go to the source

beui.dev Raw registry item This item as JSON

More from beui

All 104 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Action Swap Bluraction-swap-blurbeuiComponentsFree3 deps · 4 files
Action Swap Cascadeaction-swap-cascadebeuiComponentsFree3 deps · 4 files
Action Swap Rollaction-swap-rollbeuiComponentsFree3 deps · 4 files
Agent Activityagent-activitybeuiComponentsFree4 deps · 9 files
Agent Loading States Agent Progressagent-progressbeuiComponentsFree3 deps · 3 files
AI Sidebarai-sidebarbeuiComponentsFree4 deps · 5 files
Animated Badgeanimated-badgebeuiComponentsFree4 deps · 3 files
Number Animation Animated Numberanimated-numberbeuiComponentsFree3 deps · 3 files
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex