alert-dialog
gr8monk3ys/alert-dialogFreeComponent
alert-dialog (identity-styled).
Install it
npx shadcn@latest add https://ui.lscaturchio.xyz/r/alert-dialog.jsonSource
1"use client"23import * as React from "react"4import { AlertDialog as AlertDialogPrimitive } from "radix-ui"56import { cn } from "@/lib/utils"7import { Button } from "@/components/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/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-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-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border glass-heavy p-6 duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",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
npm packages
Other registry items
Files it writes
More from gr8monk3ys
All 69 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gr8monk3ys | Components | Free | 2 deps | |
| ActiveNavLinkactive-nav-link | gr8monk3ys | Components | Free | no deps · 2 files | |
| alertalert | gr8monk3ys | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | gr8monk3ys | Components | Free | 1 dep | |
| attachmentattachment | gr8monk3ys | Components | Free | 2 deps | |
| Avataravatar | gr8monk3ys | Components | Free | 1 dep | |
| Badgebadge | gr8monk3ys | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | gr8monk3ys | Components | Free | 2 deps |
