@nature-ui/drawer
TypeScript icon, indicating that this package has built-in type declarations

2.2.13 • Public • Published

Drawer

The Drawer component is a panel that slides out from the edge of the screen. It can be useful when you need users to complete a task or view some details without leaving the current page.

Installation

yarn add @nature-ui/drawer

Import component

import { Drawer, DrawerContent, DrawerOverlay } from '@nature-ui/drawer';

Usage

<>
  <button onClick={() => setOpen(!open)}>Open</button>
  <Drawer placement='right' isOpen={open} onClose={() => setOpen(false)}>
    <DrawerOverlay>
      <DrawerContent>
        <div>This is the drawer content</div>
        <button>This is a button</button>
      </DrawerContent>
    </DrawerOverlay>
  </Drawer>
</>

Package Sidebar

Install

npm i @nature-ui/drawer

Weekly Downloads

2

Version

2.2.13

License

MIT

Unpacked Size

292 kB

Total Files

10

Last publish

Collaborators

  • dnature