Vaul is an unstyled, performant drawer component specifically designed for React applications, intended as an alternative or replacement for traditional dialogs on mobile and tablet devices. Its current stable version is 1.1.2. The library exhibits a relatively frequent release cadence, primarily focusing on bug fixes and minor feature enhancements, as seen in the progression from v0.9.x to v1.1.x. A key differentiator is its unstyled nature, providing maximum flexibility for developers to implement custom styling (e.g., with Tailwind CSS), and its emphasis on mobile-first interaction patterns, including draggable behavior, customizable snap points, and optional background scaling effects. It integrates smoothly with modern React workflows, shipping with TypeScript types and built upon Radix UI primitives for accessibility.
npm install vaulVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic Vaul drawer with a trigger, overlay, content, title, and close button, styled minimally with Tailwind CSS classes.
Review the changelog for v0.9.4 and subsequent minor versions for specific changes. Create a CodeSandbox reproduction if you encounter issues and report them to the maintainers.
Update your HTML/JSX to use `data-vaul-drawer-wrapper` on the element intended for background scaling.
Ensure your `react` and `react-dom` versions satisfy Vaul's peer dependency requirements. Upgrade Vaul to the latest version (v1.1.2+) for React 19 compatibility.
Explicitly set `noBodyStyles={false}` or `setBackgroundColorOnScale={true}` if you wish to retain the default styling behavior, or adjust your CSS accordingly if setting them to `true` or `false` respectively.Ensure `import { Drawer } from 'vaul'` is at the top of your file. Verify `vaul` is listed in your `node_modules` and your bundler configuration is correct for ESM.Ensure your project's React version is compatible with Vaul's `peerDependencies`. Upgrade Vaul to v1.1.1 or higher for React 19 support. Use `npm dedupe` or `yarn install --force` to resolve potential duplicate React installations.
Check for CSS overrides on `body`, `html`, or elements within the drawer that might interfere with pointer events or `touch-action`. Ensure the `direction` prop on `Drawer.Root` matches your intended drag behavior. Avoid applying `data-vaul-no-drag` unnecessarily to interactive elements within the drawer.