drawer

Drawer

A panel that slides in from any edge and closes with a swipe, with snap points for a half-open state, such as filters or a mini cart on a phone.

States: Default

Parts

PartFileDoes
DrawerDrawer.vueGroups all parts of the drawer.
DrawerBodyDrawerBody.vueHolds the drawer's main content and scrolls it when the drawer reaches its height cap, keeping the header and footer in view.
DrawerCloseDrawerClose.vueCloses the drawer.
DrawerContentDrawerContent.vueHolds what the drawer shows while open.
DrawerDescriptionDrawerDescription.vueExplains the purpose of the drawer below its title.
DrawerFooterDrawerFooter.vueHolds the actions of the drawer, such as apply and cancel buttons.
DrawerHeaderDrawerHeader.vueGroups the title and description at the top of the drawer.
DrawerOverlayDrawerOverlay.vueCovers the page behind the open drawer.
DrawerTitleDrawerTitle.vueNames the drawer.
DrawerTriggerDrawerTrigger.vueOpens the drawer.

Anatomy

<Drawer>
  <DrawerTrigger />
  <DrawerContent>
    <DrawerHeader>
      <DrawerTitle />
      <DrawerDescription />
    </DrawerHeader>
    <DrawerBody />
    <DrawerFooter>
      <DrawerClose />
    </DrawerFooter>
  </DrawerContent>
</Drawer>

Styling

PartRecipe
DrawerBodydrawer-body
DrawerContentdrawer-handle
DrawerContentdrawer-content
DrawerDescriptiondrawer-description
DrawerFooterdrawer-footer
DrawerHeaderdrawer-header
DrawerOverlaydrawer-overlay
DrawerTitledrawer-title

Install

Writes 11 files into components/ui/drawer/. For agents, npx @frontic/ui docs drawer prints this reference as markdown; the MCP server serves the same.

npm packages
@vueuse/core
class-variance-authority
reka-ui

API reference

Drawer Drawer.vue

Groups all parts of the drawer.

PropTypeDefault
openboolean—
defaultOpenbooleanfalse
modalDrawerModaltrue
swipeDirectionSwipeDirection'down'
snapPointsDrawerSnapPoint[]—
snapPointDrawerSnapPoint | null—
defaultSnapPointDrawerSnapPoint | null—
snapToSequentialPointsbooleanfalse
EventPayload
update:openvalue: boolean, details: DrawerOpenChangeDetails
update:openCompletevalue: boolean
update:snapPointvalue: DrawerSnapPoint | null
SlotSlot props
default{ open: boolean; close: () => void; }

DrawerBody DrawerBody.vue

DrawerClose DrawerClose.vue

DrawerContent DrawerContent.vue

DrawerDescription DrawerDescription.vue

DrawerFooter DrawerFooter.vue

DrawerHeader DrawerHeader.vue

DrawerOverlay DrawerOverlay.vue

DrawerTitle DrawerTitle.vue

DrawerTrigger DrawerTrigger.vue

Example