Skip to main content

Function: Drawer()

Drawer(__namedParameters): Element

Defined in: composites/Drawer/Drawer.tsx:252

A modal panel anchored to one edge of the viewport.

Entity = Overlay. Use it for a region of the app that has nowhere to live right now: navigation on a narrow viewport, a filter panel, a detail inspector. It brings React Aria's focus containment, escape and outside-press dismissal, and page-scroll locking.

Controlled (isOpen + onOpenChange) or wrapped in a DialogTrigger for the uncontrolled case. For an interrupting question with a heading, body and action row, use DialogModal instead — a drawer is a region, not a prompt.

Parameters

ParameterType
__namedParametersDrawerProps

Returns

Element

Example

<Drawer
isOpen={isOpen}
onOpenChange={setOpen}
placement="start"
aria-label="Navigation"
>
<Nav />
</Drawer>