Aurora AI Confirmation
aurora-dinglebear-ai/aurora-ai-confirmationFreeBlock
Aurora-native confirmation parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-confirmation.jsonSource
1"use client"23/**4 * Aurora Confirmation — operator approve/cancel gate for a risky action.5 *6 * Visual layer is ported 1:1 from the Claude Design source (icon badge, intent7 * tint, sunken detail list, right-aligned action row). Architecture stays8 * shadcn/Aurora: `forwardRef`, `displayName`, `React.memo`, full9 * `React.HTMLAttributes` spread, and the Radix/cva `Button` for actions.10 *11 * This file deliberately re-implements `Confirmation` (rather than re-exporting12 * the legacy `core` version) so it can carry CD's `intent` + `details` API while13 * keeping every architectural guarantee. Token-only colors (`--aurora-*`); no14 * hardcoded hex; no `violet`.15 */1617import * as React from "react"18import { ChevronRight, CircleAlert, TriangleAlert } from "lucide-react"19import { Button } from "@/registry/aurora/ui/button"2021export type ConfirmationIntent = "default" | "danger"2223export interface ConfirmationProps extends React.HTMLAttributes<HTMLDivElement> {24 title: string25 description?: string26 /** Optional list of statements/lines previewing exactly what will run. */27 details?: React.ReactNode[]28 /** `danger` swaps the icon to a triangle-alert and uses destructive action styling. */29 intent?: ConfirmationIntent30 confirmLabel?: string31 cancelLabel?: string32 onConfirm?: React.MouseEventHandler<HTMLButtonElement>33 onCancel?: React.MouseEventHandler<HTMLButtonElement>34}3536// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).3738const Confirmation = (39 { ref,40 title,41 description,42 details,43 intent = "default",44 confirmLabel = "Approve",45 cancelLabel = "Cancel",46 onConfirm,47 onCancel,48 className,49 ...props50 }: ConfirmationProps & { ref?: React.Ref<HTMLDivElement> }51 ) => {52 const reactId = React.useId()53 const titleId = `${reactId}-title`54 const descriptionId = description ? `${reactId}-description` : undefined55 const Icon = intent === "danger" ? TriangleAlert : CircleAlert56 const cls = [57 "aurora-confirm",58 intent === "danger" && "aurora-confirm--danger",59 className,60 ]61 .filter(Boolean)62 .join(" ")6364 return (65 <div66 ref={ref}67 className={cls}68 role="alertdialog"69 aria-labelledby={titleId}70 aria-describedby={descriptionId}71 {...props}72 >73 <div className="aurora-confirm__head">74 <span className="aurora-confirm__badge" aria-hidden>75// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Free | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Free | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Free | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Free | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
