Dialog
Overlay dialog with optional structured layout (title/footer/intent), focus trapping, and keyboard management. Built on native <dialog stability=stable sourceHref=https://codeberg.org/urbicon/ui/src/branch/main/packages/blocks/src/lib/primitives/Dialog/index.ts related=[object Object] >.
01 Examples
Confirmation (content-only)
Form Dialog
Top Placement (command palette)
Scrollable Content
02 Customization
Slot Class Overrides
Fully Custom (unstyled)
03 Accessibility
Native Dialog
Built on <dialog> with showModal() for native inertness and stacking
context. Screen readers announce it automatically via aria-modal="true". When a title is set, it is linked via aria-labelledby.
Focus Trap
When open, focus is trapped inside the dialog. Tab cycles through interactive elements. On close, focus returns to the element that opened the dialog.
Keyboard
Escape closes the dialog (configurable via closeOnEscape).
Scroll Lock
While open, body scroll is locked. Long dialog content scrolls within the panel itself.
04 API Reference
No matching properties |