Dialog
A liquid glass modal dialog with highly rounded aesthetics.
Preview
Installation
bash
npx auralix-ui add dialogUsage
Basic Dialog
tsx
import { Dialog, DialogButton } from "@/components/ui/Dialog";
import { useState } from "react";
import { Button } from "@/components/ui/Button";
const [isOpen, setIsOpen] = useState(false);
<Button onClick={() => setIsOpen(true)}>Open Dialog</Button>
<Dialog
isOpen={isOpen}
onClose={() => setIsOpen(false)}
title="Dialog Title"
description="This is a description of the dialog contents."
footer={
<>
<DialogButton variant="secondary" onClick={() => setIsOpen(false)}>
Cancel
</DialogButton>
<DialogButton onClick={() => console.log("Confirmed")}>
Confirm
</DialogButton>
</>
}
/>Props
| Name | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | false | Whether the dialog is open. |
onClose | () => void | - | Callback to close the dialog. |
title | string | - | Dialog title. |
description | string | - | Dialog description text. |
children | ReactNode | - | Custom content body. |
footer | ReactNode | - | Footer content (usually buttons). |
Variants
Standard
Sheet
Fullscreen
On this page