React

Drawer

Info alert:Experimental feature

This is an experimental feature in the early stages of testing. It's not intended for production use.
ExamplesPropsCSS Variables

Examples

Simple drawer component

Copied to clipboard

Simple drawer content inline component

Copied to clipboard

Props

DrawerContent Props

The DrawerContent component accepts the following props.

NameTypeRequiredDefaultDescription
classNamestring''Additional classes added to the Drawer.
childrenReact.ReactNodeContent to rendered in the drawer

DrawerPanelContent Props

The DrawerPanelContent component accepts the following props.

NameTypeRequiredDefaultDescription
classNamestring''Additional classes added to the Drawer.
childrenReact.ReactNodeContent to rendered in the drawer
noPaddingbooleanfalseIndicates if there should be padding around the drawer

Drawer Props

The Drawer component accepts the following props.

NameTypeRequiredDefaultDescription
classNamestring''Additional classes added to the Drawer.
childrenReact.ReactNodeContent rendered in the left hand panel
isExpandedbooleanfalseIndicate if the drawer is expanded
isInlinebooleanfalseIndicates if the content element and panel element are displayed side by side.

CSS Variables

--pf-c-drawer__content--MarginRightc_drawer__content_MarginRightcalc(var(--pf-c-drawer__panel--Width) * -1)
--pf-c-drawer__content--Transitionc_drawer__content_Transitionmargin-right .25s ease
--pf-c-drawer__content--ZIndexc_drawer__content_ZIndexvar(--pf-global--ZIndex--xs)
--pf-c-drawer__panel--BackgroundColorc_drawer__panel_BackgroundColorvar(--pf-global--BackgroundColor--light-100)
--pf-c-drawer__panel--Transformc_drawer__panel_TransformtranslateX(0)
--pf-c-drawer__panel--Transitionc_drawer__panel_Transitiontransform .25s ease
--pf-c-drawer__panel--Widthc_drawer__panel_Width100%
--pf-c-drawer__panel--ZIndexc_drawer__panel_ZIndexvar(--pf-global--ZIndex--sm)
--pf-c-drawer__panel-body--PaddingBottomc_drawer__panel_body_PaddingBottomvar(--pf-global--spacer--md)
--pf-c-drawer__panel-body--PaddingLeftc_drawer__panel_body_PaddingLeftvar(--pf-global--spacer--md)
--pf-c-drawer__panel-body--PaddingRightc_drawer__panel_body_PaddingRightvar(--pf-global--spacer--md)
--pf-c-drawer__panel-body--PaddingTopc_drawer__panel_body_PaddingTopvar(--pf-global--spacer--md)
--pf-c-drawer__panel-body--md--PaddingBottomc_drawer__panel_body_md_PaddingBottomvar(--pf-global--spacer--lg)
--pf-c-drawer__panel-body--md--PaddingLeftc_drawer__panel_body_md_PaddingLeftvar(--pf-global--spacer--lg)
--pf-c-drawer__panel-body--md--PaddingRightc_drawer__panel_body_md_PaddingRightvar(--pf-global--spacer--lg)
--pf-c-drawer__panel-body--md--PaddingTopc_drawer__panel_body_md_PaddingTopvar(--pf-global--spacer--lg)
--pf-c-drawer__panel--md--Widthc_drawer__panel_md_Width28.125rem
--pf-c-drawer--m-expanded__panel--BoxShadowc_drawer_m_expanded__panel_BoxShadowvar(--pf-global--BoxShadow--md-left)
--pf-c-drawer--m-expanded__panel--Transformc_drawer_m_expanded__panel_TransformtranslateX(0)
--pf-c-drawer--m-expanded--m-inline__content--MarginRightc_drawer_m_expanded_m_inline__content_MarginRight0