VA

Vaul

vaul

Drawer component for React.

Utilities
react
drawer
dialog
modal
vaul
Utilities
javascript
npm
frontend
open source
Stars
8.6k
Weekly
0
Open issues
164
Bundle
~60 kB

Installation

npm install vaul

Code example

import { Drawer } from "vaul";

export function Example() {
  return (
    <Drawer.Root>
      <Drawer.Trigger>Open</Drawer.Trigger>
      <Drawer.Portal>
        <Drawer.Overlay />
        <Drawer.Content>
          <p>Drawer content</p>
        </Drawer.Content>
      </Drawer.Portal>
    </Drawer.Root>
  );
}

Pros & cons

Pros

  • Actively maintained by Emil Kowalski
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 164 open issues on GitHub

FAQs

Alternatives & similar libraries