vaul-base
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Vaul Base

npm version npm downloads license

Vaul Base is an unstyled drawer component for React, built with Base UI. It serves as a replacement for Dialog on mobile and tablet devices. The component utilizes Base UI's Dialog internally.

This is a port of Vaul to Base UI. It's originally created by Emil Kowalski.

Usage

To start using Vaul Base, install it in your project:

npm install vaul-base

Use the Drawer in your application:

import { Drawer } from "vaul-base"

function MyDrawerComponent() {
  return (
    <Drawer.Root>
      <Drawer.Trigger>Open Drawer</Drawer.Trigger>
      <Drawer.Portal>
        <Drawer.Overlay />
        <Drawer.Content>Drawer content</Drawer.Content>
      </Drawer.Portal>
    </Drawer.Root>
  )
}

Examples

Here are additional examples demonstrating the component in use.

Documentation

You can use original Vaul documentation for more information.

Package Sidebar

Install

npm i vaul-base

Weekly Downloads

400

Version

0.0.5

License

MIT

Unpacked Size

182 kB

Total Files

7

Last publish

Collaborators

  • borabaloglu