Drawer

The Drawer component is used to display content in a panel that slides in from the side of the screen.

Usage & Examples

Default

default.tsx
<Drawer
              open={open}
              title="Filters"
              placement="right"
              theme="primary"
              glass={false}
              rounding="medium"
              shadow="light"
              onClose={() => setOpen(false)}
              closeOnOverlayClick={true}
              closeOnEscape={true}
              closeButtonAriaLabel="Close drawer"
            >
              <p>Drawer content for settings, filters, or details.</p>
            </Drawer>

Props API

28 props
Columns
Drawer props API
Default
Description
aria-describedbystringNoariaARIA Describedby attribute forwarded to the relevant accessible element.
aria-labelstringNoariaARIA Label attribute forwarded to the relevant accessible element.
aria-labelledbystringNoariaARIA Labelledby attribute forwarded to the relevant accessible element.
bodyClassNamestringNopropsAdditional CSS class names for the body section.
childrenReactNodeNopropsContent rendered inside the component.
classNamestringNostylingAdditional CSS class names for the component root.
closeButtonAriaLabelstringNoprops"Close drawer"Close Button Aria Label.
closeButtonClassNamestringNopropsAdditional CSS class names for the close button section.
closeOnEscapebooleanNopropstrueClose On Escape.
closeOnOverlayClickbooleanNopropstrueClose On Overlay Click.
data-testidstringNotestingTest id used to identify the component in tests.
footerReactNodeNopropsCustom footer content rendered by the component.