# vaul

> Drawer component for React.

Latest version **1.1.2** (published 2024-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install vaul
pnpm add vaul
yarn add vaul
bun add vaul
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2024-12-14 |
| First published | 2023-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 180 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8621 |
| Author | Emil Kowalski |
| Maintainers | emilkowalski |
| Keywords | react, drawer, dialog, modal |

## Links

- npm: https://www.npmjs.com/package/vaul
- Repository: https://github.com/emilkowalski/vaul
- Homepage: https://vaul.emilkowal.ski/
- Issues: https://github.com/emilkowalski/vaul/issues
- npm.io page: https://npm.io/package/vaul

## Dependencies (1)

- [@radix-ui/react-dialog](https://npm.io/package/@radix-ui/react-dialog.md) ^1.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2024-12-14
- 1.1.1 — 2024-10-29
- 1.1.0 — 2024-10-13
- 1.0.0 — 2024-09-26
- 0.9.9 — 2024-09-25
- 0.9.8 — 2024-09-25
- 0.9.7 — 2024-09-25
- 0.9.6 — 2024-09-24
- 0.9.5 — 2024-09-24
- 0.9.4 — 2024-09-18
- 0.9.3 — 2024-09-13
- 0.9.2 — 2024-09-04
- 0.9.1 — 2024-05-07
- 0.9.0 — 2024-02-01
- 0.8.1 — 2024-02-01
- … 51 more at https://npm.io/package/vaul/versions

## README

https://github.com/emilkowalski/vaul/assets/36730035/fdf8c5e8-ade8-433b-8bb0-4ce10e722516

Vaul is an unstyled drawer component for React that can be used as a Dialog replacement on tablet and mobile devices. You can read about why and how it was built [here](https://emilkowal.ski/ui/building-a-drawer-component).

## Usage

To start using the library, install it in your project:,

```bash
npm install vaul
```

Use the drawer in your app.

```jsx
import { Drawer } from 'vaul';

function MyComponent() {
  return (
    <Drawer.Root>
      <Drawer.Trigger>Open</Drawer.Trigger>
      <Drawer.Portal>
        <Drawer.Content>
          <Drawer.Title>Title</Drawer.Title>
        </Drawer.Content>
        <Drawer.Overlay />
      </Drawer.Portal>
    </Drawer.Root>
  );
}
```

## Documentation

Find the full API reference and examples in the [documentation](https://vaul.emilkowal.ski/getting-started).

---
_Source: https://npm.io/package/vaul · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
