alert-dialog
lyse/alert-dialogFreeComponent
lyse publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by lyse on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.getlyse.com/r/alert-dialog.jsonSource
1import * as React from "react"2import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"3import { cva, type VariantProps } from "class-variance-authority"45import { cn } from "@/lib/utils"6import { Button } from "@/registry/new-york/ui/button/button"7import "./alert-dialog.css"89/* ------------------------------------------------------------------ */10/* CVA */11/* ------------------------------------------------------------------ */1213const alertDialogIconVariants = cva(14 "alert-dialog-icon flex items-center justify-center shrink-0 size-[var(--layout-size-lg)] rounded-[var(--layout-radius-full)] [&_svg]:size-[var(--layout-size-xs)]",15 {16 variants: {17 variant: {18 brand: "alert-dialog-icon-brand",19 destructive: "alert-dialog-icon-destructive",20 success: "alert-dialog-icon-success",21 warning: "alert-dialog-icon-warning",22 },23 },24 defaultVariants: {25 variant: "destructive",26 },27 }28)2930/* ------------------------------------------------------------------ */31/* AlertDialog */32/* ------------------------------------------------------------------ */3334function AlertDialog({35 ...props36}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {37 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />38}3940/* ------------------------------------------------------------------ */41/* AlertDialogTrigger */42/* ------------------------------------------------------------------ */4344function AlertDialogTrigger({45 ...props46}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {47 return (48 <AlertDialogPrimitive.Trigger49 data-slot="alert-dialog-trigger"50 {...props}51 />52 )53}5455/* ------------------------------------------------------------------ */56/* AlertDialogPortal */57/* ------------------------------------------------------------------ */5859function AlertDialogPortal({60 ...props61}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {62 return <AlertDialogPrimitive.Portal {...props} />63}6465/* ------------------------------------------------------------------ */66/* AlertDialogOverlay */67/* ------------------------------------------------------------------ */6869function AlertDialogOverlay({70// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from lyse
All 33 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| action-cardaction-card | lyse | Components | Free | no deps · 2 files | |
| alertalert | lyse | Components | Free | 2 deps · 2 files | |
| avataravatar | lyse | Components | Free | 3 deps · 2 files | |
| badgebadge | lyse | Components | Free | 1 dep · 2 files | |
| banner-infobanner-info | lyse | Components | Free | 2 deps · 2 files | |
| breadcrumbbreadcrumb | lyse | Components | Free | 2 deps · 2 files | |
| buttonbutton | lyse | Components | Free | 2 deps · 2 files | |
| callout-cardcallout-card | lyse | Components | Free | 1 dep · 2 files |
