Skip to content

Drawer

Slide-out panel with focus trap, overlay, and header/body/footer slots.

Usage

vue
<script setup>
import { ref } from "vue";
import { ArchDrawer, ArchButton } from "@archora/ui";

const open = ref(false);
</script>

<template>
  <ArchButton @click="open = true">Open drawer</ArchButton>
  <ArchDrawer v-model:open="open" title="Inspector" side="right">Details</ArchDrawer>
</template>

Live sandbox

Drawer can be tested directly on this page.

interactive
<Drawer />

Props

PropTypeDefaultDescription
openbooleanfalseOpen state.
side"left" | "right" | "top" | "bottom""right"Placement side.
size"sm" | "md" | "lg" | "full""md"Size.
titlestring-Title.
descriptionstring-Description.
closeOnEscapebooleantrueClose on Escape.
closeOnOverlaybooleantrueClose on overlay click.
showClosebooleantrueShows the close button.
modalbooleantrueEnables modal semantics.
stickyFooterbooleanfalseMakes the footer sticky.
resizablebooleanfalseEnables resize styles.

Events

EventPayloadDescription
update:openopen: booleanopen change.
openChangeopen: booleanComponent event.

Slots

SlotPropsDescription
title-Custom title.
description-Custom description.
defaultPanel body.
footerFooter area.