# Vaul

> Unstyled drawer for React that replaces dialogs on mobile: drag to dismiss, snap points, scaled background.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/vaul

free

Unstyled drawer for React that replaces dialogs on mobile: drag to dismiss, snap points, scaled background.

by Emil Kowalski[GitHub](https://github.com/emilkowalski/vaul)[npm](https://npmjs.com/package/vaul)

[visit](https://vaul.emilkowal.ski/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://vaul.emilkowal.ski](https://vaul.emilkowal.ski/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Base UI](https://tastebase.ehsanulsiam.workers.dev/browse/base-ui)

Unstyled, accessible React primitives from the Radix, Floating UI and MUI teams.

no preview

### [Radix Primitives](https://tastebase.ehsanulsiam.workers.dev/browse/radix-ui)

The original unstyled, accessible React primitives, now one tree-shakeable package.

no preview

### [shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)

Copy-in React components on Tailwind, built on Base UI, Radix or React Aria, plus a registry CLI.

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

## Try it

## Looks that pick it

[Apple-likefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/apple)[iOS nativefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/ios-native)

## For your agent

##### Install

`npm i vaul`

##### Use it for

- a mobile bottom sheet for filters, share options or a cart
- a responsive pattern: Dialog on desktop, drawer on mobile
- a sheet with peek, half and full snap points over the main content

##### Skip it when

- desktop-only modals: use a dialog from radix-ui or base-ui
- a side navigation panel on desktop: use a Sheet/Dialog primitive
- a project built on base-ui: its maintained Drawer component fits better
- React Native: use a native bottom-sheet library

##### What's inside17 free

- Drawer.Root
- Drawer.Trigger
- Drawer.Portal
- Drawer.Overlay
- Drawer.Content
- Drawer.Close
- Drawer.Title
- Drawer.Description
- Drawer.Handle
- Drawer.NestedRoot
- Snap points
- Side drawer (direction)
- Nested drawers
- Scaled background
- Non-modal
- Non-dismissible
- Inputs

##### Facts

**Frameworks**
react

**Styling**
unstyled

**Weight**
small

**Accessibility**
strong

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)[Sonner](https://tastebase.ehsanulsiam.workers.dev/browse/sonner)

##### Alternatives

[Base UI](https://tastebase.ehsanulsiam.workers.dev/browse/base-ui)[Radix Primitives](https://tastebase.ehsanulsiam.workers.dev/browse/radix-ui)

[Compare Vaul with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/vaul-alternatives)

```
import { Drawer } from 'vaul'

<Drawer.Root>
  <Drawer.Trigger>Open</Drawer.Trigger>
  <Drawer.Portal>
    <Drawer.Overlay className="fixed inset-0 bg-black/40" />
    <Drawer.Content className="fixed inset-x-0 bottom-0 rounded-t-2xl bg-white p-4">
      <Drawer.Title>Filters</Drawer.Title>
    </Drawer.Content>
  </Drawer.Portal>
</Drawer.Root>
```

https://vaul.emilkowal.ski

Loading website

[Visit](https://vaul.emilkowal.ski/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
