An unstyled draggable drawer component for React.
Based on @radix-ui/react-dialog and inspired by Emil Kowalski's awesome Vaul.
Demo: vladyoslav-drawer.vercel.app
For full documentation, visit vladyoslav-drawer.vercel.app/docs.
Install the component from your command line.
npm i @vladyoslav/drawer
Use the drawer in your app.
import { Drawer } from '@vladyoslav/drawer'
export const MyComponent = () => (
<Drawer.Root>
<Drawer.Trigger>Open Drawer</Drawer.Trigger>
<Drawer.Portal>
<Drawer.Overlay />
<Drawer.Content>...</Drawer.Content>
</Drawer.Portal>
</Drawer.Root>
)
To see components props, visit the full documentation.