svelte-drawer-sheet
Examples
pnpm add svelte-drawer-sheet

On this page

Overview Basic drawer

Examples

Full-screen page Position Snap points Virtual keyboard Nested drawers Modal behavior Detached triggers

Svelte / Components

Drawer

Svelte 5

A panel that slides from a screen edge and supports gesture dismissal.

Overview

Basic drawer

Compose the parts you need and style every surface yourself.

Live example

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.

↗
Focus workspace Opens as its own screen

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.

Swipe up to open

VirtualKeyboardProvider

Virtual keyboard

On a phone, open each drawer and focus the last field.

Default The keyboard can cover the field.
Keyboard aware Recommended The field is lifted and scrolled into view.

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.

svelte-drawer-sheet MIT · Svelte 5