Weftv0.4.0
GitHubFigma
Blade AI
Display · Drawerstable

Drawer

A panel that slides in from the right to show details or a short task without leaving the page. A header with icon, title, subtitle and accessory, a scrollable body and a footer pinned to the bottom. DrawerRow lays out label and value pairs.

Preview

#preview

Change the options and the code follows. Show code opens the React snippet.

drawer-example.tsx
import { Drawer, DrawerRow } from "@blade-ai/weft/components/drawer";

<Drawer
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  title="Settlement details"
  subtitle="setl_4521 · 7 Oct 2026"
  icon={WorkspaceIcon}
  headerAccessory={<Badge intent="positive">Settled</Badge>}
  footer={<Button>Download report</Button>}
>
  <DrawerRow label="Amount">$12,480.00</DrawerRow>
  <DrawerRow label="UTR">HDFCR52026100712345</DrawerRow>
</Drawer>

All states

#all-states

Desktop and mobile widths, rendered inline, from the Drawer artboard.

Drawer · desktop · mobile
Drawer · Desktop
Drawer · Mobile

Props

#props

Read from the component source. Booleans are is-prefixed. A star marks a required prop.

Drawer
Prop
Type
Default
Description
isOpen *
boolean
—
Controls visibility.
onClose *
() => void
—
Fires on Esc, overlay click or the close button.
title *
string
—
Heading; also the accessible name of the dialog.
subtitle
ReactNode
—
Line under the title, e.g. an id and date.
icon
IconComponent
—
Icon shown in the 32px tile before the title.
headerAccessory
ReactNode
—
Trailing header content before the close button, usually a Badge.
children
ReactNode
—
Scrollable body.
footer
ReactNode
—
Actions pinned to the bottom, right-aligned. Buttons share the width on mobile.
closeLabel
string
"Close"
Accessible name of the close button.
isInline
boolean
false
Render inline instead of in a portal (docs and tests).
DrawerRow
Prop
Type
Default
Description
label *
ReactNode
—
Muted caption of the row.
children *
ReactNode
—
The value, shown stronger.

Usage

#usage

Short rules for choosing and writing drawer.

Do
Use a drawer for details of a row or a short edit while the list stays in view.
Put the primary action in the footer.
Ask before closing when there are unsaved changes.
Don't
Use a drawer for long, multi-step flows.
Open a drawer from inside another drawer.
Rely on the overlay click as the only way to close it.

Accessibility

#accessibility

A modal dialog labelled by its title. Focus moves in on open and returns to the opener on close.

Keyboard
Key
Action
Tab / Shift+Tab
Moves through controls inside the drawer.
Esc
Closes the drawer; focus returns to the opener.
ARIA
Element
Role / attribute
When
Drawer
role="dialog" · aria-modal="true" · aria-label = title
While open.
Close button
aria-label = closeLabel
Always present.
Page behind
inert and not scrollable
While open.