Alert Dialog
gymnopedies/alert-dialogFreeComponent
Alert Dialog — gymnopédies-themed shadcn primitive.
Install it
npx shadcn@latest add https://gymnopedies.shoota.work/r/alert-dialog.jsonSource
1import * as React from "react"2import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"34import { cn } from "@/lib/utils"5import { Button } from "@/components/ui/button"67function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {8 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />9}1011function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {12 return (13 <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />14 )15}1617function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {18 return (19 <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />20 )21}2223function AlertDialogOverlay({24 className,25 ...props26}: AlertDialogPrimitive.Backdrop.Props) {27 return (28 <AlertDialogPrimitive.Backdrop29 data-slot="alert-dialog-overlay"30 className={cn(31 "fixed inset-0 isolate z-50 bg-black/10 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",32 className33 )}34 {...props}35 />36 )37}3839function AlertDialogContent({40 className,41 size = "default",42 ...props43}: AlertDialogPrimitive.Popup.Props & {44 size?: "default" | "sm"45}) {46 return (47 <AlertDialogPortal>48 <AlertDialogOverlay />49 <AlertDialogPrimitive.Popup50 data-slot="alert-dialog-content"51 data-size={size}52 className={cn(53 "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-xl bg-popover p-4 text-popover-foreground 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-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",54 className55 )}56 {...props}57 />58 </AlertDialogPortal>59 )60}6162function AlertDialogHeader({63 className,64 ...props65}: React.ComponentProps<"div">) {66 return (67 <div68 data-slot="alert-dialog-header"69 className={cn(70// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from gymnopedies
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gymnopedies | Components | Free | 2 deps | |
| Alertalert | gymnopedies | Components | Free | 1 dep | |
| Articlearticle | gymnopedies | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | gymnopedies | Components | Free | no deps | |
| Avataravatar | gymnopedies | Components | Free | 1 dep | |
| Badgebadge | gymnopedies | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | gymnopedies | Components | Free | 2 deps | |
| Buttonbutton | gymnopedies | Components | Free | 2 deps |
