Skip to content

PraxisDrawer

A slide-in side panel (drawer/sidebar) that appears from the edge of the screen. Supports left, right, top, and bottom positions. Useful for detail panels and filter sidebars.

Usage

vue
<script setup>
import { ref } from 'vue'
import { PraxisDrawer } from 'praxis-vue-ui'

const open = ref(false)
</script>

<template>
  <button @click="open = true">Open Drawer</button>

  <PraxisDrawer v-model:visible="open" header="Details" position="right">
    <p>Drawer content goes here.</p>
  </PraxisDrawer>
</template>

Props

PropTypeDefaultDescription
visiblerequiredbooleanControls drawer open/close state. Use with v-model:visible.
headerstringundefinedDrawer header title.
position'left' | 'right' | 'top' | 'bottom''right'Which edge the drawer slides in from.
sizestring'30rem'Width (for left/right) or height (for top/bottom) of the drawer.
dismissablebooleantrueCloses the drawer when clicking outside.
modalbooleantrueShows an overlay backdrop.

Emits

EventPayloadDescription
update:visiblebooleanEmitted when the drawer is closed.

Slots

SlotDescription
defaultDrawer body content.
headerCustom header rendering.
footerFooter area, typically action buttons.

Built with VitePress