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.
Install using npm, yarn, or pnpm:
npm install weaselyarn add weaselpnpm add weaselImport 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>
);
}