logo-icon
STW UI

Drawer

Drawer is a grid layout that can show/hide a sidebar on the left or right side of the page.

Usage

svelte
import { Drawer } from 'stwui';
// OR
import Drawer from 'stwui/drawer'; // for tree shaking

Default Drawer

With placement

With Header and Footer

With Header and Footer

Drawer Props

handleClose (() => void) | undefined
placement 'left' | 'right' | 'top' | 'bottom' right
disableEscClose boolean false
disableOverlayClose boolean false
panelClass string pointer-events-auto panel transition-transform duration-200

Drawer Slots

backdrop <Drawer.Backdrop slot="backdrop" />
header <Drawer.Header slot="header" />
content <Drawer.Content slot="content" />
default
footer <Drawer.Footer slot="footer" />

Drawer.Header Slots

default

Drawer.Content Slots

default

Drawer.Footer Slots

default

Drawer Class Identifiers

stwui-drawer-wrapper
stwui-drawer-panel
stwui-drawer-inner-panel
stwui-drawer-backdrop
stwui-drawer-header
stwui-drawer-content
stwui-drawer-footer