Components / Overlays
Drawer
A modal panel sliding from the left, right or bottom.
@ruckc/truss-ui Overlays
Import
import { Drawer } from '@ruckc/truss-ui'; Playground
position
size
API
| Prop | Type | Default | Description |
|---|---|---|---|
open bindable | boolean | false | Whether it is open. Bind it with `bind:open`. |
title required | string | — | Heading text. |
position | 'left' | 'right' | 'bottom' | 'right' | Which edge it attaches to. |
size | 'sm' | 'md' | 'lg' | 'md' | Control size: `sm` (24px), `md` (32px, default) or `lg` (40px). |
children required snippet | Snippet | — | Content, as a Svelte snippet. |
footer snippet | Snippet | — | Footer content, as a Svelte snippet. |
onclose event | () => void | — | Called when it is dismissed. |