Default
Edit Profile
Make changes to your profile here. Click save when you're done.
Installation
Install the component
templui add dialogAdd the JavaScript to your layout
@dialog.Script()Call this template in your base layout file (e.g., in the <head> section).
Examples
External Trigger
External Dialog
This dialog can be triggered from anywhere on the page.
Standalone Content
Standalone Dialog
This dialog content works without a wrapper component.
Perfect for dynamic content loading with HTMX or similar frameworks.
API Reference
Dialog
Main dialog wrapper component. Provides context for child components.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
Trigger
Element that triggers the dialog to open. Can be used inside Dialog wrapper or externally with For prop.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
Content
Dialog content container. Can be used standalone for HTMX or inside Dialog wrapper.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
Header
Header section of the dialog.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
Title
Dialog title component. Should be used inside Header.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
Description
Dialog description component. Should be used inside Header.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
Body
Body/content section of the dialog.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
Close
Element that closes the dialog.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
JavaScript API
// Open a dialog programmatically
window.tui.dialog.open("dialog-id");
// Close a dialog
window.tui.dialog.close("dialog-id");
// Toggle dialog state
window.tui.dialog.toggle("dialog-id");
// Check if dialog is open (returns true/false)
const isOpen = window.tui.dialog.isOpen("dialog-id");