# Drawer

> A Sheet that defaults to the bottom edge.

- Category: [Overlays](https://tarve.dev/docs.md#overlays)
- Import: `import { Drawer } from "@tarve/core";`
- Props type: `DrawerProps`
- Source: [packages/core/src/advanced-controls.ts:120](https://github.com/omarcosr/tarve/blob/main/packages/core/src/advanced-controls.ts#L120)

## Usage

```tsx title="Drawer.tsx"
import { Button, Drawer, Text } from "@tarve/core";

let open = true;

<>
  <Button variant="outline" onClick={() => (open = true)}>
    Show activity
  </Button>
  <Drawer
    open={open}
    size={280}
    title="Activity"
    onOpenChange={(next) => {
      open = next;
    }}
  >
    <Text>3 new events</Text>
  </Drawer>
</>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `open` (required) | `boolean` | — |  |
| `closeOnEscape` | `boolean` | — |  |
| `closeOnOverlay` | `boolean` | — |  |
| `description` | `string` | — |  |
| `onOpenChange` | `(open: boolean) => void` | — |  |
| `showClose` | `boolean` | — |  |
| `side` | `SheetSide` | `"bottom"` |  |
| `size` | `Style["width"]` | `320` |  |
| `title` | `string` | — |  |

## Common props

Shared by every component (descriptions: https://tarve.dev/docs.md#common-props): `children`, `class`, `className`, `highlight`, `id`, `key`, `motionFrom`, `onHighlight`, `onPaste`, `onPointerLeave`, `onPointerMove`, `onSize`, `onTransitionEnd`, `rovingGroup`, `style`.

## Types

```ts title="SheetSide"
type SheetSide = "left" | "right" | "top" | "bottom";
```

Previous: [Sheet](https://tarve.dev/docs/components/Sheet.md) · Next: [Popover](https://tarve.dev/docs/components/Popover.md)

---

Tarve v0.13.8 · HTML version: https://tarve.dev/docs/components/Drawer · Index for agents: https://tarve.dev/llms.txt
