Dialog
Dialog is a compound component that provides dialog functionality.
Active
Examples
size
Different size options for the Dialog component.
sm
md
lg
xl
Installation
npm install @your-design-system/dialogimport { Dialog } from "@/components/ui/dialog"
export function DialogDemo() {
return (
<Dialog size="md">
{/* Content */}
</Dialog>
)
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | The open prop for the component. |
title | string | - | The title prop for the component. |
description | string | - | The description prop for the component. |
Styling
The component uses Tailwind CSS classes for styling. You can customize the appearance by overriding these classes.
Base Classes
fixedleft-[50%]top-[50%]z-50gridw-fulltranslate-x-[-50%]translate-y-[-50%]gap-4borderbg-backgroundp-6shadow-lgduration-200sm:rounded-lgsize Variants
sm
max-w-smmd
max-w-lglg
max-w-2xlxl
max-w-4xlDesign System Compliance
This component is validated against atomic design principles and foundation token usage.
⚠ Atomic Design Issues
Issue 1Hardcoded spacing found: gap-4, p-6. Use semantic spacing tokens.
Fix these issues to ensure your component integrates properly with the design system.
On This Page