Skip to content

Drawer

A panel that slides in from the side of the screen. Use for contextual detail views, settings panels, and secondary workflows that don't require a full page.

Basic

Tailwind v4
vue
<script setup>
const open = ref(false)
</script>

<Button @click="open = true">Open Drawer</Button>

<Drawer :open="open" title="Drawer Title" @close="open = false">
  <p>Drawer body content goes here.</p>
</Drawer>

Wide

Tailwind v4
vue
<Drawer :open="open" title="Wide" width="wide" @close="open = false">
  <!-- content -->
</Drawer>

Right side

Tailwind v4
vue
<Drawer :open="open" title="Settings" side="right" @close="open = false">
  <!-- settings content -->
</Drawer>

Props

PropTypeDefaultDescription
openbooleanfalseControls visibility
titlestringHeader title text
width'narrow' | 'medium' | 'wide' | 'extended' | 'full''medium'Panel width
side'left' | 'right''left'Which side the drawer slides from
closablebooleantrueWhether to show the close (X) button

Events

EventDescription
closeEmitted when the X button or blanket is clicked, or Escape is pressed

Slots

SlotDescription
defaultScrollable body content
headerOverride the default title bar entirely
footerOptional footer (pinned to bottom, with top border)

Private — Jetpack Labs internal use only