Dialog
crenspire-glass-ui/dialogFreeComponent
A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
Live preview
live · rendered by the registry
Rendered by crenspire/glass-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glass-ui.crenspire.com/r/dialog.jsonSource
1"use client"23import * as React from "react"4import {5 Dialog as BaseDialog,6 DialogContent as BaseDialogContent,7 DialogDescription,8 DialogFooter,9 DialogHeader,10 DialogTitle,11 DialogTrigger,12} from "@/components/ui/dialog"13import { cn } from "@/lib/utils"14import type { GlassCustomization } from "@/lib/glass-utils"15import { hoverEffects, type HoverEffect } from "@/lib/hover-effects"1617export interface DialogContentProps extends Omit<React.ComponentProps<typeof BaseDialogContent>, "glass"> {18 variant?: "default" | "glass" | "glassSubtle" | "frosted" | "fluted" | "crystal"19 animated?: boolean20 hover?: HoverEffect21 glass?: GlassCustomization22}2324/**25 * Glass UI Dialog - Enhanced dialog with glassy effects and animations26 *27 * @example28 * ```tsx29 * <DialogContent30 * glass={{31 * color: "rgba(139, 92, 246, 0.15)",32 * blur: 40,33 * outline: "rgba(139, 92, 246, 0.3)"34 * }}35 * >36 * Dialog content37 * </DialogContent>38 * ```39 */40export const DialogContent = React.forwardRef<41 React.ElementRef<typeof BaseDialogContent>,42 DialogContentProps43>(({ className, variant = "glass", animated = true, hover = "none", glass, children, ...props }, ref) => {44 return (45 <BaseDialogContent46 ref={ref}47 variant={variant}48 glass={glass}49 className={cn(50 "relative overflow-hidden",51 animated && "backdrop-blur-[var(--blur-lg)]",52 hoverEffects({ hover }),53 className54 )}55 {...props}56 >57 {children}58 </BaseDialogContent>59 )60})61DialogContent.displayName = "DialogContent"6263export {64 BaseDialog as Dialog,65 DialogTrigger,66 DialogHeader,67 DialogFooter,68 DialogTitle,69 DialogDescription,70}71
What it pulls in
npm packages
Other registry items
Files it writes
More from crenspire/glass-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Alertalert | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Alert Dialogalert-dialog | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Avataravatar | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Badgebadge | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Breadcrumbbreadcrumb | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Buttonbutton | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Button Groupbutton-group | crenspire/glass-ui | Components | Free | no deps · 5 files |
