# DrawerHeader

Supply UI 1.1.0. On top of the page, part of `Drawer`.

A panel from an edge that the person drags: swipe it away, or rest it at several heights (`snapPoints={[0.5, 0.9]}` with `handle="button"`). `side` is `bottom`, `top`, `left`, `right`. Use it where the panel is moved by hand, above all on a phone; for a plain side panel the dialog's `drawer` is enough

The top of a Drawer, holding its title and description

## Options

No options of its own.

It also takes the 280 attributes of the element or UI SDK part it renders (`className`, `aria-label`, events…).

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/card.css`, `components/tabs.css`, `components/dialog.css`, `components/tab-bar.css`, `components/prose.css`, `components/site-header.css`, `components/page-transitions.css`, `parts/carousel.css`, `parts/drawer.css`, `parts/board.css`, besides the ones every page loads.

## In the examples

- Details from below: An order rises as a drawer you can drag (https://www.supply.family/ui/#scene-orders)

## On top of the page: notes

**States.** Closed, opening (fades and rises), open, closing (fades before what it changed appears: `afterClose`). While open, focus is inside and Escape closes it; when it closes, focus goes back to what opened it.

**Do**
- Name every dialog, drawer and popover (`DialogTitle`, `DrawerTitle`, or `aria-label`).
- Use `AlertDialog` for anything that cannot be undone, with the action named on its button ("Delete 3 files").
- Use a `Drawer` on a phone for what a `Popover` does on a computer.

**Don't**
- Don't open a dialog from a dialog; change what the open one shows instead.
- Don't put the only way to do something in a right-click menu or a tooltip.
- Don't use a toast for something the person must not miss: that is an `Alert` on the page.
