Aurora Dialog
aurora-dinglebear-ai/aurora-dialogUnverifiedComponent
Modal dialog with Aurora panel-strong background, strong shadow, and backdrop blur.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-dialog.jsonSource
1"use client"23/**4 * Aurora Design System — Dialog / Modal5 * peer dep: @radix-ui/react-dialog6 */78import * as React from "react"9import * as DialogPrimitive from "@radix-ui/react-dialog"10import { X } from "lucide-react"11import { cn } from "@/lib/utils"1213// ─── Re-exports ───────────────────────────────────────────────────────────────1415const Dialog = DialogPrimitive.Root16const DialogTrigger = DialogPrimitive.Trigger17const DialogPortal = DialogPrimitive.Portal18const DialogClose = DialogPrimitive.Close1920// ─── Overlay / Backdrop ───────────────────────────────────────────────────────2122function DialogOverlay({ ref, className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {23 return (24 <DialogPrimitive.Overlay25 ref={ref}26 className={cn(27 "fixed inset-0 z-50 backdrop-blur-[2px]",28 "data-[state=open]:animate-in data-[state=closed]:animate-out",29 "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",30 className31 )}32 style={{ backgroundColor: "var(--aurora-overlay)" }}33 {...props}34 />35 )36}3738// ─── Content ──────────────────────────────────────────────────────────────────3940export interface DialogContentProps41 extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {42 /** Hide the default X close button */43 hideClose?: boolean44 /** Controls the maximum width of the dialog */45 size?: "sm" | "default" | "lg" | "xl" | "full"46}4748const sizeClasses: Record<NonNullable<DialogContentProps["size"]>, string> = {49 sm: "max-w-sm",50 default: "max-w-lg",51 lg: "max-w-2xl",52 xl: "max-w-4xl",53 full: "max-w-[calc(100vw-2rem)] max-h-[calc(100vh-2rem)]",54}5556function DialogContent({ ref, className, hideClose = false, size = "default", children, style, ...props }: DialogContentProps & { ref?: React.Ref<React.ComponentRef<typeof DialogPrimitive.Content>> }) {57 return (58 <DialogPortal>59 <DialogOverlay />60 <DialogPrimitive.Content61 ref={ref}62 className={cn(63 "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",64 "w-full",65// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora Accordionaurora-accordion | aurora | Components | Unverified | 2 deps | |
| Aurora Alert Dialogaurora-alert-dialog | aurora | Components | Unverified | 2 deps | |
| Aurora Aspect Ratioaurora-aspect-ratio | aurora | Components | Unverified | no deps | |
| Aurora Avataraurora-avatar | aurora | Components | Unverified | 1 dep | |
| Aurora Badgeaurora-badge | aurora | Components | Unverified | 2 deps | |
| Aurora Banneraurora-banner | aurora | Components | Unverified | 1 dep | |
| Aurora Breadcrumbaurora-breadcrumb | aurora | Components | Unverified | 2 deps | |
| Aurora Buttonaurora-button | aurora | Components | Unverified | 2 deps |
