Svelte / Components
Drawer
Svelte 5A panel that slides from a screen edge and supports gesture dismissal.
Overview
Basic drawer
Compose the parts you need and style every surface yourself.
Examples
Common patterns
swipeDirection="right" · shallow routing
Full-screen page
Open two page-like drawers, then use swipe back, the page controls, or browser Back and Forward to move through the stack.
swipeDirection
Position
Anchor a drawer to any screen edge.
snapPoints · SwipeArea
Snap points
Drag between three heights, or swipe up from the bottom edge to open.
VirtualKeyboardProvider
Virtual keyboard
On a phone, open each drawer and focus the last field.
nested drawers
Nested drawers
Open all three levels; the frontmost drawer owns focus and dismissal.
modal
Modal behavior
Choose focus containment and scroll locking independently.
createHandle · payload
Detached triggers
One drawer can receive data from triggers anywhere on the page.