Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Drawer

A drawer component with slide-in panel, backdrop, and focus trap.

vu-drawer · @velkin/react/drawer

Copy page

Import

React
npm i @velkin/react

import { VuDrawer } from "@velkin/react/drawer";

Examples

API

Props

PropTypeDefaultDescription
openbooleanfalseWhether the drawer is visible. Default: `false`.
closablebooleanfalseShows a dismiss control on the panel. Default: `false`.
closeLabelstring""Accessible name for the dismiss control; empty uses locale catalog. Default: `""`.
ariaLabelstring""Accessible name when the header slot is empty. Default: `""`.
sideVuDrawerSide"left"Edge the panel slides in from. Default: `"left"`.
variantVuDrawerVariant"elevated"Surface paint recipe. Default: `"elevated"`.
toneVuDrawerTone"normal"Neutral surface weight. Default: `"normal"`.
sizeVuDrawerSize"md"Padding scale for header, body, and footer. Default: `"md"`.
radiusVuDrawerRadius"md"Panel corner preset (`sm`/`md`/`lg`; Role C′ omits `none`/`full`). Default: `"md"`.
dividerbooleanfalseHairlines between shown regions. Default: `false`.
persistentbooleanfalseBlocks backdrop and Escape close. Default: `false`.
closeOnEscbooleantrueEscape emits `vu-close` when topmost. Default: `true`.

Events

EventDetailDescription
vu-closeVuDrawerCloseDetailCancelable close intent; parent sets `open` false when not prevented.
vu-openCustomEvent<void>When the drawer begins opening.
vu-afteropenCustomEvent<void>After the open transition finishes.
vu-aftercloseCustomEvent<void>After the close transition finishes.

Slots

SlotDescription
headerTop region (title or toolbar).
bodyMain scrollable content.
footerBottom actions region.

CSS parts

PartDescription
overlayBackdrop behind the panel.
panelSliding surface.
close-buttonDismiss control when `closable`.
headerHeader slot wrapper.
header-dividerHairline below the header when `divider` is set.
bodyBody slot wrapper.
footer-dividerHairline above the footer when `divider` is set.
footerFooter slot wrapper.

Methods

MethodDescription
show- Sets `open` to true.
hide- Sets `open` to false.
toggle- Toggles `open`.
focus- Focuses the panel container.

Types

NameDefinition
VuDrawerCloseDetail
{ reason: VuDrawerCloseReason; }
VuDrawerRadius
"sm" | "md" | "lg"
VuDrawerSide
"left" | "right"
VuDrawerSize
"sm" | "md" | "lg"
VuDrawerTone
"subtle" | "normal" | "strong"
VuDrawerVariant
"outline" | "elevated" | "soft" | "ghost" | "filled"

Related

Feedback

  • AlertAn alert component with intent colors, variants, and optional dismiss.
  • DialogA dialog component with region slots, focus trap, and backdrop.
  • NotificationA notification component that renders the toast viewport.
  • OverlayAn overlay component with backdrop and centered content slot.
  • PopoverA popover component with smart placement and a trigger slot.
  • ProgressA progress component with linear, ring, and indeterminate modes.

Guides

  • AccessibilityLabels and overlays
  • AppearanceStatus colors

Browse

  • Previous: DialogEarlier in the sidebar
  • Next: NotificationLater in the sidebar
  • All componentsBrowse the full index