Modal dialog with header, body, and footer sections.
import { Dialog, DialogHeader, DialogBody, DialogFooter } from "@/components/ui";const [open, setOpen] = useState(false);
return (
<>
<Button onClick={() => setOpen(true)}>Open Dialog</Button>
<Dialog open={open} onClose={() => setOpen(false)}>
<DialogHeader>
<h2>Dialog Title</h2>
<p>Dialog description here</p>
</DialogHeader>
<DialogBody>
<p>Dialog content goes here.</p>
</DialogBody>
<DialogFooter>
<Button variant="outline" onClick={() => setOpen(false)}>
Cancel
</Button>
<Button onClick={() => setOpen(false)}>Confirm</Button>
</DialogFooter>
</Dialog>
</>
);Different dialog sizes
<Dialog size="sm" open={open} onClose={onClose}>...</Dialog><Dialog size="md" open={open} onClose={onClose}>...</Dialog><Dialog size="lg" open={open} onClose={onClose}>...</Dialog><Dialog size="xl" open={open} onClose={onClose}>...</Dialog><Dialog size="full" open={open} onClose={onClose}>...</Dialog>Configure your app with the features you need and download production-ready code.
Start Configuring