Drawer - Keep React

The Drawer component provides a flexible and customizable way to create drawers that can slide in from different directions (left, right, top, or bottom) within your React application. It supports features like animation, keyboard accessibility (ESC key to close), and clicking outside the drawer to close it.

Table of Contents#

Default Drawer#

The Default Drawer component showcases a simple content inside the drawer.

Drawer Position#

You can position the drawer in a specific direction, such as left, right, top, or bottom.

API Reference#

Here is a list of the props that you can pass to the drawer component:

PropertyDescriptionTypeDefault
openDrawer show or not?stringfalse
onOpenChangesetState functionFunctionNone
showCloseIconDrawer close button show or not?booleantrue

Content API Reference#

Here is a list of the props that you can pass to the drawer content component:

PropertyDescriptionTypeDefault
positionDrawer position
left
top
right
bottom
bottom

Reference#

Our drawer component is built using the @radix-ui/react-dialog package. For more information , follow the documentation @radix-ui/react-dialog.