Dialog
Modal task window. Focus is trapped inside, Escape closes, and focus returns to the trigger.
Example
<Button data-ink-dialog="#demo">Invite member</Button>
<Dialog id="demo" label="Invite member">
<TextField id="invite-email" label="Email" />
<Button type="button">Send invite</Button>
</Dialog>Sizes
Pass size="sm" | "md" | "lg". ConfirmDialog locks to sm.
Events
document.addEventListener("ink:dialog:open", (event) => {
console.log(event.target.id);
});Props
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | - | Targeted by data-ink-dialog="#id" triggers. |
label | string | - | Dialog landmark name. |
size | sm | md | lg | md | Panel width. |
Accessibility
role="dialog"+aria-modal+ focus trap via the shared helper.- Escape and backdrop click close; body scroll locks while open.