# Dialog Component API A modal dialog component for displaying important information or capturing user input in an overlay. --- ## Installation ```toml # Cargo.toml [dependencies] shadcn-ui-leptos-dialog = "0.7" ``` ```rust use shadcn_ui_leptos_dialog::Dialog; ``` --- ## Import ```rust // Default theme use shadcn_ui_leptos_dialog::{ Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose }; // New York theme use shadcn_ui_leptos_dialog::{ Dialog as DialogNewYork, DialogTrigger as DialogTriggerNewYork, // ... other components }; // Signal-managed variant use shadcn_ui_leptos_dialog::{ SignalManagedDialog, SignalManagedDialogState }; ``` --- ## Component API ### Dialog (Root) The context provider that manages dialog state. | Prop | Type | Default | Description | |------|------|---------|-------------| | `open` | `Signal` | **Required** | Controls dialog visibility | | `on_open_change` | `Option>` | `None` | Called when open state changes | | `children` | `Option` | `None` | Dialog content | ### DialogTrigger Button that opens the dialog. | Prop | Type | Default | Description | |------|------|---------|-------------| | `class` | `MaybeProp` | `None` | Additional CSS classes | | `id` | `MaybeProp` | `None` | Unique identifier | | `style` | `Signal