DocumentationDownloads and examples

Drawer

The Drawer component is a panel that slides in from the edge of the screen which helps the user access additional information without crowding the main display.

Drawer Props

NameUseTypeDefinition
open
required
booleanDetermines whether the drawer should be open or not.
parentRef
optional
anyReference for parent element and renders the drawer in absolute position on parent with overlay.
className
optional
stringAdds a class to the drawer.
renderAsPortal
optional
booleanSets the drawer as a portal with overlay.
position
optional
'left' | 'right'Specifies the position of the drawer relative to the parent element.
onClose
optional
() => voidHandler function for the close button.
onBack
optional
() => voidHandler function for the back button.

Examples

Drawer with back button
To indicate the user has reached a second navigation level through the drawer. This enables the user to go to the previous level if they click.

Drawer title

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odio aperiam libero hic dolorum veritatis, necessitatibus, neque suscipit autem nostrum repellat corporis nihil, a saepe est. Autem beatae sunt debitis quasi!
Drawer with close button
Close button appears when the user has not gone to any navigation level, allowing the drawer to be closed if pressed. Clicking outside the area on the overlay drawer would also close it.

Drawer title

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odio aperiam libero hic dolorum veritatis, necessitatibus, neque suscipit autem nostrum repellat corporis nihil, a saepe est. Autem beatae sunt debitis quasi!