Rebar UI

1.0

opinion

Drawer

A side panel for navigation or detail, with a scrim.

Menu and detailsLeft for navigation, right for a record; Esc closes
Left
Right
Bottom
No title

In context

Projects on a phoneMenu from the app bar; the details drawer from a card

Projects

Harbour rebrandOn track · 84% done
Tideline mobileReview · 61% done
Crew interviewsLate · 33% done
Rota exportDone · 100% done
EngDue 24 Oct
Offline sync for tasks

Queue edits while offline and replay them when the crew is back in range.

Props

PropTypeRequiredDefault
openboolean | undefinedNo—
defaultOpenboolean | undefinedNo—
onOpenChange((open: boolean) => void) | undefinedNo—
triggerReactNodeNo—
titleReactNodeNo—
descriptionReactNodeNo—
footerReactNodeNo—
classNamestring | undefinedNo—
sideDrawerSide | undefinedNo—
sizenumber | "auto" | undefinedNo—
maxHeightstring | number | undefinedNo—
dismissibleboolean | undefinedNo—
containerHTMLElement | null | undefinedNo—
appearance"default" | "popup" | undefinedNo—
showHandleboolean | undefinedNo—
titleStyle"eyebrow" | "heading" | undefinedNo—

Accessibility

Built on the same Radix Dialog primitive as Dialog: role="dialog" with aria-modal="true", focus trapped inside the panel while open, Esc and a backdrop click close it. A visible close button is always rendered, never gesture-only dismissal.

data-rebar-* attributes

data-rebar-component="drawer" on the panel; data-rebar-side mirrors side; data-rebar-part="header"|"title"|"description"|"body"|"footer"|"close". Radix's own data-state="open"|"closed" is read directly.

Migrating to Ant Design

AntD's own Drawer is a close match: open, title and footer keep their names, side maps to placement. onOpenChange is renamed to onClose and flagged, since AntD's onClose takes an event, not a boolean.