Drawer

Drawer is a component for a panel that appears from the edge of the screen.

Usage

import { Drawer } from "@yamada-ui/react"
<Drawer.Root>
  <Drawer.OpenTrigger />
  <Drawer.Content>
    <Drawer.Overlay />
    <Drawer.CloseButton />
    <Drawer.Header />
    <Drawer.Body />
    <Drawer.Footer />
    <Drawer.CloseTrigger />
  </Drawer.Content>
</Drawer.Root>

Change Size

Change Position

To change the display position, set placement to values like "block-start" or "inline-start". By default, "inline-end" is set.

Change Duration

To change the duration, set duration to a numerical value (seconds).

Do Not Block Scroll on Mount

By default, scrolling of the main content is blocked when the panel is opened to ensure accessibility. If you do not want to block the scroll of the main content, set blockScrollOnMount to false.

Disable the Close Button

To disable the close button, set withCloseButton to false.

Disable the Overlay

To disable (hide) the overlay of the panel, set withOverlay to false.

Close on drag

If you want to close the Drawer on drag, set closeOnDrag to true.

Hide the Drag Bar

To hide the drag bar, set withDragBar to false.

Customize the Close Button

Customize the Overlay

Control

Use open and onClose to control the visibility.

Props

Accessibility

Currently, this section is being updated due to the migration of v2.