alert-dialog
draco-china-github/alert-dialogFreeComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/alert-dialog.jsonSource
1"use client"23import * as React from "react"4import { AlertDialog as AlertDialogPrimitive } from "radix-ui"56import { cn } from "@/registry/radix-sera/lib/utils"7import { Button } from "@/registry/radix-sera/ui/button"89function AlertDialog({10 ...props11}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {12 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />13}1415function AlertDialogTrigger({16 ...props17}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {18 return (19 <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />20 )21}2223function AlertDialogPortal({24 ...props25}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {26 return (27 <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />28 )29}3031function AlertDialogOverlay({32 className,33 ...props34}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {35 return (36 <AlertDialogPrimitive.Overlay37 data-slot="alert-dialog-overlay"38 className={cn(39 "fixed inset-0 z-50 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",40 className41 )}42 {...props}43 />44 )45}4647function AlertDialogContent({48 className,49 size = "default",50 ...props51}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {52 size?: "default" | "sm"53}) {54 return (55 <AlertDialogPortal>56 <AlertDialogOverlay />57 <AlertDialogPrimitive.Content58 data-slot="alert-dialog-content"59 data-size={size}60 className={cn(61 "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-none bg-popover p-6 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",62 className63 )}64 {...props}65 />66 </AlertDialogPortal>67 )68}6970function AlertDialogHeader({71 className,72 ...props73}: React.ComponentProps<"div">) {74 return (75 <div76 data-slot="alert-dialog-header"77 className={cn(78// … truncated
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps | |
| button-groupbutton-group | shadcn/ui | Components | Free | no deps |
