Glass Alert Dialog
einui/glass-alert-dialogFreeComponent
A liquid glass styled alert dialog for confirmations.
Live preview
live · rendered by the registry
Rendered by einui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.eindev.ir/r/glass-alert-dialog.jsonSource
1"use client"23import * as React from "react"4import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"5import { cn } from "@/lib/utils"6import { glassButtonVariants } from "./glass-button"78const GlassAlertDialog = AlertDialogPrimitive.Root910const GlassAlertDialogTrigger = AlertDialogPrimitive.Trigger1112const GlassAlertDialogPortal = AlertDialogPrimitive.Portal1314const GlassAlertDialogOverlay = React.forwardRef<15 React.ElementRef<typeof AlertDialogPrimitive.Overlay>,16 React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>17>(({ className, ...props }, ref) => (18 <AlertDialogPrimitive.Overlay19 className={cn(20 "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",21 "data-[state=open]:animate-in data-[state=closed]:animate-out",22 "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",23 className,24 )}25 {...props}26 ref={ref}27 />28))29GlassAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName303132const GlassAlertDialogContent = React.forwardRef<33 React.ElementRef<typeof AlertDialogPrimitive.Content>,34 React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>35>(({ className, ...props }, ref) => (36 <GlassAlertDialogPortal>37 <GlassAlertDialogOverlay />38 <AlertDialogPrimitive.Content39 ref={ref}40 className={cn(41 "fixed left-1/2 top-1/2 z-50 w-full max-w-sm -translate-x-1/2 -translate-y-1/2",42 "rounded-2xl border border-white/20 p-6",43 "bg-white/10 backdrop-blur-2xl",44 "shadow-[0_8px_32px_rgba(0,0,0,0.4)]",45 "data-[state=open]:animate-in data-[state=closed]:animate-out",46 "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",47 "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",48 "data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",49 "data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",50 // Glass highlight51 "before:absolute before:inset-0 before:rounded-2xl",52 "before:bg-linear-to-b before:from-white/15 before:to-transparent before:pointer-events-none",53 className,54 )}55 {...props}56 />57 </GlassAlertDialogPortal>58))59GlassAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName6061const GlassAlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (62// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from einui
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Base Widgetbase-widget | einui | Components | Free | 1 dep | |
| Calendar Widgetscalendar-widget | einui | Components | Free | 1 dep | |
| Clock Widgetsclock-widget | einui | Components | Free | 1 dep | |
| Glass Avatarglass-avatar | einui | Components | Free | 1 dep | |
| Glass Badgeglass-badge | einui | Components | Free | 1 dep | |
| Glass Breadcrumbglass-breadcrumb | einui | Components | Free | 1 dep | |
| Glass Buttonglass-button | einui | Components | Free | 2 deps | |
| Glass Cardglass-card | einui | Components | Free | no deps |
