Feedback
Drawer
A side or bottom panel for the second layer, with a blurred overlay and a solid panel.
<script>
import { Drawer } from "@codeatlasdev/ui";
let open = $state(false);
</script>
<Drawer bind:open title="Filters" side="right" width="360px">
...
{#snippet actions()}<Button onclick={apply}>Apply</Button>{/snippet}
</Drawer>
Same architecture as Dialog: the overlay blurs the page and the panel is a solid surface that slides in from an edge. For a mobile bottom panel with swipe to dismiss, use Sheet.
Right (default)
Slides in from the right, with a footer actions area.
Code
Left and bottom
Left suits mobile navigation. Bottom is a simple bottom panel without gestures.
Code
Notification panel
A real-world use: a 400px wide panel on the right.
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | false | Bindable open state. |
side | 'left' | 'right' | 'bottom' | 'right' | Edge the panel slides from. |
title | string | – | Header title. |
width | string | '360px' | Panel width for left and right. |
children | Snippet | – | Panel body. |
actions | Snippet | – | Footer buttons, separated by a top rule. |
onOpenChange | (open: boolean) => void | – | Called whenever the open state changes. |
class | string | '' | Extra classes on the panel. |