Drawer

Drawer

import Drawer from "@kiwicom/orbit-components/lib/Drawer";
<Drawer shown>Content to show</Drawer>

Props

NameTypeDefaultDescription
actionsReact.NodeActions, especially Buttons, that will be rendered in the Drawer’s header.
childrenReact.NodeThe content of the Drawer.
dataTeststringOptional prop for testing purposes.
idstringSets the id attribute for the Drawer.
noPaddingbooleanfalseIf true, the wrapper won’t have any inner padding.
onClose() => void \| PromiseFunction for handling the onClose event.
positionenum"right"The side on which the Drawer should appear.
shownboolean"true"If true, the Drawer will be visible; otherwise, it will be visually hidden but will stay in the DOM.
suppressedbooleanfalseIf true, the Drawer will have a cloudy background.
titlestringTitle of the Drawer that will be rendered in the Drawer’s header. If ariaLabel is undefined, this will be used as aria-label.
widthstring"320px"The width of the Drawer.
lockScrollingbooleantrueWhether to prevent scrolling of the rest of the page while Drawer is open. This is on by default to provide a better user experience.
fixedHeaderbooleanIf true, the DrawerHeader will be fixed to the top.
labelHidestringHideLabel for the close button.
ariaLabelstringOptional prop for aria-label.

enum

position
"right"
"left"