Skip to content

vladyoslav/drawer

Repository files navigation

@vladyoslav/drawer

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

Documentation

For full documentation, visit vladyoslav-drawer.vercel.app/docs.

Installation

Install the component from your command line.

npm i @vladyoslav/drawer

Usage

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>
)

API Reference

To see components props, visit the full documentation.