Skip to main content
  1. Docs
  2. Components
  3. Overlays

Drawer

A full-height panel from the edge: a task beside the page, with the page still in view.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="dialog">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Playground

Every prop, live, and the code it takes.

Side
Size
edit-member.tsx
import { Button, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerFooter, DrawerTrigger, TextField } from "@qeetrix/react";

<Drawer>
  <DrawerTrigger render={<Button>Open</Button>} />
  <DrawerContent title="Priya Sharma">
    <DrawerBody>
      <TextField label="Display name" />
    </DrawerBody>
    <DrawerFooter>
      <DrawerClose render={<Button>Save changes</Button>} />
    </DrawerFooter>
  </DrawerContent>
</Drawer>

02

Beside the page

A full-height panel from the end edge, the page still in view. Focus goes to the first field; Escape, an outside click or a swipe close it.

03

Start or end

side: end is the right in left-to-right text, the left in right-to-left.

04

Sizes

sm 400, md 560 and lg 800px, never wider than the window less 48px.

05

Unsaved work

dismissible={false}: only its own actions close it, so a stray click loses nothing.

Next — DrawerUsage