AppDrawer
A side sheet: a modal dialog that slides in from an edge of the screen. It sits on the shared overlay stack (useOverlay), so it traps Tab, gives focus back to the button that opened it, locks the page scroll and closes on Escape, and a menu or dialog opened from inside it takes those keys first. start and end follow the text direction, so RTL flips them. It slides on a transform on the preset's enter and exit durations; under reduced motion it fades in place.
Install: pnpm add-component AppDrawer
Basic usage
Focus moves to the close button, Tab stays inside, Escape or a click on the backdrop closes it, and focus goes back to the button.
Every side
start and end are logical: in a right-to-left page start opens on the right.
Persistent, with a long body
Escape and the backdrop do nothing; a choice in the footer closes it. The body scrolls under a fixed header and footer, and takes a Tab stop so the keyboard can scroll it.
API
modelValue(boolean): Open or closed (use v-model).side('start' | 'end' | 'top' | 'bottom'): The edge it slides from. start and end follow the text direction.size('sm' | 'md' | 'lg' | 'full'): Width for start and end (20, 28, 42rem), largest height for top and bottom (40, 60, 85% of the screen). full covers the screen.title(string): Heading at the top, and the dialog's accessible name.description(string): A line under the title, linked with aria-describedby.label(string): The dialog's name when there is no title.closeLabel(string): Name of the close button.hideClose(boolean): Leave out the close button (give the footer a way out instead).persistent(boolean): Ignore Escape and backdrop clicks; only a button inside closes it.#default({ close }): The body. It scrolls on its own, and becomes a named Tab stop while it overflows.#header({ close }): Replaces the title and description; the close button stays.#footer({ close }): Actions under a rule at the bottom, end-aligned.