Dialog
aqua/dialogFreeComponent
The Aqua alert panel: soft gradient sheet with a deep drop shadow.
Live preview
live · rendered by the registry
Rendered by aqua on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://aqua.duca.dev/r/dialog.jsonSource
1"use client"23import * as React from "react"4import * as DialogPrimitive from "@radix-ui/react-dialog"56import { cn } from "@/lib/utils"78function Dialog({9 ...props10}: React.ComponentProps<typeof DialogPrimitive.Root>) {11 return <DialogPrimitive.Root data-slot="dialog" {...props} />12}1314function DialogTrigger({15 ...props16}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {17 return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />18}1920function DialogPortal({21 ...props22}: React.ComponentProps<typeof DialogPrimitive.Portal>) {23 return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />24}2526function DialogClose({27 ...props28}: React.ComponentProps<typeof DialogPrimitive.Close>) {29 return <DialogPrimitive.Close data-slot="dialog-close" {...props} />30}3132function DialogOverlay({33 className,34 ...props35}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {36 return (37 <DialogPrimitive.Overlay38 data-slot="dialog-overlay"39 className={cn(40 "fixed inset-0 z-50 bg-[rgba(30,38,50,0.35)] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",41 className42 )}43 {...props}44 />45 )46}4748function DialogContent({49 className,50 children,51 ...props52}: React.ComponentProps<typeof DialogPrimitive.Content>) {53 return (54 <DialogPortal>55 <DialogOverlay />56 <DialogPrimitive.Content57 data-slot="dialog-content"58 className={cn(59 "fixed left-1/2 top-1/2 z-50 flex w-[min(480px,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-xl bg-[linear-gradient(180deg,#fbfbfc_0%,#eceef2_100%)] p-7 shadow-[inset_0_1px_0_rgba(255,255,255,0.9),0_0_0_1px_rgba(20,30,50,0.2),0_26px_60px_rgba(20,30,50,0.35),0_5px_14px_rgba(20,30,50,0.18)] outline-none duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",60 className61 )}62 {...props}63 >64 {children}65 </DialogPrimitive.Content>66 </DialogPortal>67 )68}6970function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {71 return (72 <div73 data-slot="dialog-header"74 className={cn("flex flex-col gap-1.5", className)}75 {...props}76 />77 )78}7980function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {81 return (82 <div83// … truncated
What it pulls in
npm packages
Files it writes
More from aqua
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alertalert | aqua | Components | Free | 1 dep | |
| Avataravatar | aqua | Components | Free | 1 dep | |
| Badgebadge | aqua | Components | Free | 2 deps | |
| Buttonbutton | aqua | Components | Free | 2 deps | |
| Chat Bubblechat-bubble | aqua | Components | Free | no deps | |
| Checkboxcheckbox | aqua | Components | Free | 2 deps | |
| Code Blockcode-block | aqua | Components | Free | 2 deps · 2 files | |
| Cursorcursor | aqua | Components | Free | no deps |
