Modal
moleculesDialog on the native <dialog>: top layer, focus trap, Escape and click-outside, four width presets, tones, busy state and optional resizing.
Edit profile
bind:open controls visibility; body and footer snippets; focus lands on the first field and returns to the trigger on close.
Sizes and tones
size sm/md/lg/xl sets the desktop width; tone adds a title glyph and a coloured top border.
Busy, scrolling body, resizable, filled footer
busy blocks Escape and the backdrop; maxHeight scrolls the body; resizeKey adds a desktop drag edge that persists; footerFill hands the footer one wide layout.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title required | string | — | |
open bindable | boolean | — | Controlled visibility. When provided the `<dialog>` stays mounted and `showModal()`/`close()` follow the value; closing sets it back to false. Omit to open on mount (mount/unmount the component to show/hide). |
onclose | () => void | — | |
body required | Snippet | — | |
footer | Snippet | — | |
footerFill | boolean | false | Let the footer's content own the full width instead of hugging the right edge — for a footer that is one layout wrapper (an AutoGrid of actions, say) rather than a short row of buttons. |
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Desktop width preset (sm 24rem / md 34rem / lg 48rem / xl 72rem). A `resizeKey` drag still overrides it. |
tone | Tone | 'neutral' | Title glyph + 3px top border in the semantic colour. |
busy | boolean | false | Work in flight: body is inert, a spinner sits by the title and Escape, backdrop and the close button stop closing until it clears. A close the browser forces (repeated Escape, Android back) still closes and calls `onclose`. |
resizeKey | string | — | When set, the sheet is horizontally resizable on desktop and the chosen width persists under this localStorage key. |
class | string | '' | |
style | string | '' | |
bodyClass | string | '' | Class on the inner sheet (the visible panel). |
maxHeight | string | — | Cap the sheet height; the body scrolls inside it. |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |