alert-dialog
neobrutalism/alert-dialogFreeComponent
neobrutalism publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by neobrutalism on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://neobrutalism.com/r/alert-dialog.jsonSource
1"use client"23import * as React from "react"4import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"56import { cn } from "@/lib/utils"7import { Button } from "@/components/ui/button"89function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {10 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />11}1213function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {14 return (15 <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />16 )17}1819function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {20 return (21 <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />22 )23}2425function AlertDialogOverlay({26 className,27 ...props28}: AlertDialogPrimitive.Backdrop.Props) {29 return (30 <AlertDialogPrimitive.Backdrop31 data-slot="alert-dialog-overlay"32 className={cn(33 "fixed inset-0 isolate z-50 bg-foreground/20 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",34 className35 )}36 {...props}37 />38 )39}4041function AlertDialogContent({42 className,43 size = "default",44 ...props45}: AlertDialogPrimitive.Popup.Props & {46 size?: "default" | "sm"47}) {48 return (49 <AlertDialogPortal>50 <AlertDialogOverlay />51 <AlertDialogPrimitive.Popup52 data-slot="alert-dialog-content"53 data-size={size}54 className={cn(55 "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-4 rounded border-2 bg-popover p-4 text-popover-foreground shadow-md duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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",56 className57 )}58 {...props}59 />60 </AlertDialogPortal>61 )62}6364function AlertDialogHeader({65 className,66 ...props67}: React.ComponentProps<"div">) {68 return (69 <div70 data-slot="alert-dialog-header"71 className={cn(72// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from neobrutalism
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalism | Components | Free | 2 deps | |
| alertalert | neobrutalism | Components | Free | 2 deps | |
| aspect-ratioaspect-ratio | neobrutalism | Components | Free | 1 dep | |
| avataravatar | neobrutalism | Components | Free | 1 dep | |
| badgebadge | neobrutalism | Components | Free | 2 deps | |
| breadcrumbbreadcrumb | neobrutalism | Components | Free | 2 deps | |
| buttonbutton | neobrutalism | Components | Free | 2 deps | |
| button-groupbutton-group | neobrutalism | Components | Free | 2 deps |
