Alert dialog
neobrutalism-components/alert-dialogFreeComponent
Neobrutalism Components publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by Neobrutalism Components on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalism.dev/r/alert-dialog.jsonSource
1"use client"23import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"45import * as React from "react"67import { buttonVariants } from "@/components/ui/button"89import { cn } from "@/lib/utils"1011function AlertDialog({12 ...props13}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {14 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />15}1617function AlertDialogTrigger({18 ...props19}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {20 return (21 <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />22 )23}2425function AlertDialogPortal({26 ...props27}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {28 return (29 <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />30 )31}3233function AlertDialogOverlay({34 className,35 ...props36}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {37 return (38 <AlertDialogPrimitive.Overlay39 data-slot="alert-dialog-overlay"40 className={cn(41 "fixed inset-0 z-50 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",42 className,43 )}44 {...props}45 />46 )47}4849function AlertDialogContent({50 className,51 ...props52}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {53 return (54 <AlertDialogPortal>55 <AlertDialogOverlay />56 <AlertDialogPrimitive.Content57 data-slot="alert-dialog-content"58 className={cn(59 "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-base border-2 border-border p-6 shadow-shadow duration-200 sm:max-w-lg",60 className,61 )}62 {...props}63 />64 </AlertDialogPortal>65 )66}6768function AlertDialogHeader({69 className,70 ...props71}: React.ComponentProps<"div">) {72 return (73 <div74 data-slot="alert-dialog-header"75 className={cn("flex flex-col gap-2 text-center sm:text-left", className)}76 {...props}77 />78 )79}8081function AlertDialogFooter({82 className,83 ...props84}: React.ComponentProps<"div">) {85 return (86 <div87 data-slot="alert-dialog-footer"88// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Neobrutalism Components
All 92 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Neobrutalism Components | Components | Free | 1 dep | |
| Alertalert | Neobrutalism Components | Components | Free | no deps | |
| Avataravatar | Neobrutalism Components | Components | Free | 1 dep | |
| Badgebadge | Neobrutalism Components | Components | Free | no deps | |
| Breadcrumbbreadcrumb | Neobrutalism Components | Components | Free | 1 dep | |
| Buttonbutton | Neobrutalism Components | Components | Free | 1 dep | |
| Calendarcalendar | Neobrutalism Components | Components | Free | 2 deps | |
| Cardcard | Neobrutalism Components | Components | Free | no deps |
