Sections
Get Started
Components
- Accordion
- Alert Dialog
- Animated Gradient Text
- Animated Shiny Text
- Avatar
- Badge
- Bento Box
- Bento Grid
- Border Beam
- Breadcrumbs
- Card
- Checkbox
- Custom Cursor
- Dialog
- Glow Border
- Glow Card
- Hyper Text
- Logo Beam
- Marquee
- Number Counter
- Popover
- Ripple Button
- Scroll Area
- Separator
- Shimmer Button
- Shinny Icons
- Tabs
- Terminal
- Text Animate
- Theme Toggler
- Typing Animation
- Word Rotate
"use client"
import { useState } from "react"
import { motion } from "motion/react"
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
export function DialogDemo() {
return (
<div className="bg-background flex flex-col items-center justify-center">
<Dialog>
<DialogTrigger asChild>
<motion.div whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }}>
<Button
size="lg"
className="bg-primary text-primary-foreground hover:neon-glow transition-all"
>
Open Modal
</Button>
</motion.div>
</DialogTrigger>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle className="text-primary text-2xl font-bold">
System Update
</DialogTitle>
<DialogDescription className="text-muted-foreground pt-2">
You are about to deploy your dark-first UI library. This will
apply <strong>Vivid Purple</strong> accents across your entire
dashboard.
</DialogDescription>
</DialogHeader>
<div className="flex flex-col gap-4 py-4">
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
<p className="text-foreground/80 text-sm">
Notice how this box sits on the glassy background. The 1px
border creates that we discussed.
</p>
</div>
</div>
<div className="flex justify-end gap-3">
<Button variant="ghost" className="hover:bg-white/5">
Cancel
</Button>
<Button className="bg-primary hover:neon-glow">
Confirm Deployment
</Button>
</div>
</DialogContent>
</Dialog>
</div>
)
}
Installation
pnpm dlx shadcn@latest add https://ebonui.com/r/dialog.json
Usage
import { AlertDialogDemo } from "@/registry/example/dialog-demo"<div className="relative h-[500px] w-full overflow-hidden">
<AlertDialogDemo />
</div>Props
Dialog
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes for styling. |
open | boolean | - | Controls open state manually. |
onOpenChange | (open: boolean) => void | - | Callback to handle open state changes. |
AlertDialogTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Whether to render the trigger as a child element. |
className | string | - | Additional CSS classes. |
AlertDialogContent
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes for styling. |
overlayClassName | string | - | CSS classes for the overlay. |
closeOnClickOutside | boolean | true | Whether clicking outside closes the dialog. |
AlertDialogCloseTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Whether to render the close trigger as a child element. |
className | string | - | Additional CSS classes. |
AlertDialogHeader
This is a container for the dialog header.
AlertDialogTitle
This is the title of the dialog.
AlertDialogDescription
This is a brief description of the dialog’s purpose.
AlertDialogFooter
This is a container for footer actions (e.g., buttons).
Support Ebon UI by giving it a star on GitHub!
A lot of work goes into maintaining and improving Ebon UI. Your stars help show your support and encourage further development.
Star on Github