Dialog

Stable
This component has limited functionality on the server side. In Next.js, add "use client" at the top to make it work.

A modal dialog component for displaying important content that requires user attention or interaction.

Import

TypeScript React
import { Dialog } from "laxod";

Basic Usage

A simple dialog with a title, description, and custom content.

Basic Dialog

Confirmation Dialog

Use dialogs to confirm destructive or important actions.

Confirmation Dialog

Form Dialog

Dialogs can contain forms and input fields for collecting user data.

Form Dialog

Controlled Dialog

Control the dialog's open state programmatically using the open and onOpenChange props.

Controlled Dialog

Props

PropTypeDefaultDescription
titlestring-Title text displayed at the top
childrenReactNode-Content to display in the dialog
descriptionstring-Optional description below the title
triggerReactNode-Element that opens the dialog when clicked
openboolean-Controlled open state
onOpenChange(open: boolean) => void-Callback when open state changes