Skip to content

frontpagefyi/weasel

Repository files navigation

Weasel

Note

This project is a forked and maintained version of Vaul.

Tip

Since the current version of this package is used to publish updates and fixes from Vaul that went unreleased, you can use the original documentation.

Weasel is an unstyled drawer component for React that can be used as a Dialog replacement on tablet and mobile devices.

Usage

Install using npm, yarn, or pnpm:

npm install weasel
yarn add weasel
pnpm add weasel

Import the necessary components from the package:

import * as Drawer from 'weasel';

function MyDrawerComponent() {
  return (
    <Drawer.Root>
      <Drawer.Trigger>Open Drawer</Drawer.Trigger>
      <Drawer.Portal>
        <Drawer.Content>
          <Drawer.Title>Drawer Title</Drawer.Title>
          {/* Drawer body content goes here */}
        </Drawer.Content>
      </Drawer.Portal>
    </Drawer.Root>
  );
}

About

A drawer component for React.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 45