Drawer
moleculesSide panel on the native <dialog> with an optional page-nav column and sticky footer; full-screen under 48rem.
Provider settings
bind:open, title + page + icon in the header, a nav snippet of NavItems beside the content, a sticky footer.
Sides and widths
side="left" or "right"; width is any CSS length on wide viewports and clamps to the screen; navWidth sizes the page column.
Long content, custom header, mobile nav
the body scrolls under a sticky footer; header replaces the title row; navMobile swaps the nav strip for a compact control under 48rem.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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). |
side | 'left' | 'right' | 'bottom' | 'right' | `bottom` is a sheet rising from the bottom edge, full width, at most 85dvh tall. |
width | string | '620px' | Panel width on wide viewports (any CSS length); clamps to 100vw. Below 48rem a side panel is always full-screen. |
navWidth | string | '150px' | Width of the `nav` column on wide viewports. |
flush | boolean | false | Drop the padding around the content. |
title required | string | — | |
page | string | — | Name of the current page, shown after the title in the header. |
icon | IconName | — | Leading header glyph. |
onclose | () => void | — | |
closeLabel | string | 'Close panel' | |
header | Snippet | — | Replaces the whole header row (title, page, close button). |
nav | Snippet | — | Vertical page list beside the content on wide viewports; on narrow viewports it becomes a horizontal strip above the content unless `navMobile` is provided. |
navMobile | Snippet | — | |
children required | Snippet | — | |
footer | Snippet | — | |
class | string | — | |
style | string | — | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |