Skip to content
Patternfly Logo

Info alert:Beta feature

This Beta component is currently under review, so please join in and give us your feedback on the PatternFly forum.

Examples

Basic

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Panel on right

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Panel on left

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Panel on bottom

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Basic inline

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Inline panel on right

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Inline panel on left

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Stacked content body elements

content-body
content-body with padding
content-body

Stacked content body elements

content-body
content-body with padding
content-body

Modified content padding

Drawer content padding.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Modified panel padding

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Additional section above drawer content

drawer-section
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Static drawer

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.
drawer-panel

Breakpoint

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.

Props

Drawer

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent rendered in the left hand panel
classNamestringNo''Additional classes added to the Drawer.
isExpandedbooleanNofalseIndicates if the drawer is expanded
isInlinebooleanNofalseIndicates if the content element and panel element are displayed side by side.
isStaticbooleanNofalseIndicates if the drawer will always show both content and panel.
onExpand() => voidNo() => {}Callback when drawer panel is expanded after waiting 250ms for animation to complete.
position'left' | 'right' | 'bottom'No'right'Position of the drawer panel

DrawerContent

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer.
classNamestringNo''Additional classes added to the Drawer.
panelContentReact.ReactNodeYesContent rendered in the drawer panel.

DrawerPanelContent

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer panel.
classNamestringNo''Additional classes added to the drawer.
hasNoBorderbooleanNofalseFlag indicating that the drawer panel should not have a border.
widths{ default?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; lg?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; xl?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; '2xl'?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; }NoWidth for drawer panel at various breakpoints

DrawerContentBody

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer
classNamestringNo''Additional classes added to the Drawer.
hasPaddingbooleanNofalseIndicates if there should be padding around the drawer content body

DrawerPanelBody

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer
classNamestringNo''Additional classes added to the Drawer.
hasNoPaddingbooleanNofalseIndicates if there should be no padding around the drawer panel body

DrawerSection

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer section.
classNamestringNo''Additional classes added to the drawer section.

DrawerHead

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoContent to be rendered in the drawer head
classNamestringNo''Additional classes added to the drawer head.
hasNoPaddingbooleanNofalseIndicates if there should be no padding around the drawer panel body of the head

DrawerActions

NameTypeRequiredDefaultDescription
childrenReact.ReactNodeNoActions to be rendered in the panel head.
classNamestringNo''Additional classes added to the drawer actions button.

DrawerCloseButton

NameTypeRequiredDefaultDescription
aria-labelstringNo'Close drawer panel'Accessible label for the drawer close button
classNamestringNo''Additional classes added to the drawer close button outer <div>.
onClose() => voidNo() => undefined as anyA callback for when the close button is clicked

CSS variables

.pf-c-drawer--pf-c-drawer__section--BackgroundColor
#fff
.pf-c-drawer--pf-c-drawer__content--FlexBasis
100%
.pf-c-drawer--pf-c-drawer__content--BackgroundColor
#fff
.pf-c-drawer--pf-c-drawer__content--ZIndex
100
.pf-c-drawer--pf-c-drawer__panel--FlexBasis
100%
.pf-c-drawer--pf-c-drawer__panel--md--FlexBasis
50%
.pf-c-drawer--pf-c-drawer__panel--MinWidth
50%
.pf-c-drawer--pf-c-drawer__panel--MaxHeight
auto
.pf-c-drawer--pf-c-drawer--m-panel-bottom__panel--md--MinHeight
50%
.pf-c-drawer--pf-c-drawer__panel--xl--MinWidth
28.125rem
.pf-c-drawer--pf-c-drawer__panel--xl--FlexBasis
28.125rem
.pf-c-drawer--pf-c-drawer--m-panel-bottom__panel--xl--MinHeight
18.75rem
.pf-c-drawer--pf-c-drawer--m-panel-bottom__panel--xl--FlexBasis
18.75rem
.pf-c-drawer--pf-c-drawer__panel--ZIndex
200
.pf-c-drawer--pf-c-drawer__panel--BackgroundColor
#fff
.pf-c-drawer--pf-c-drawer__panel--TransitionDuration
250ms
.pf-c-drawer--pf-c-drawer__panel--TransitionProperty
margin, transform, box-shadow
.pf-c-drawer--pf-c-drawer__panel--m-resizable--PaddingLeft
0.5625rem
.pf-c-drawer--pf-c-drawer--m-panel-left__panel--m-resizable--PaddingRight
0.5625rem
.pf-c-drawer--pf-c-drawer--m-panel-bottom__panel--m-resizable--PaddingTop
0.5625rem
.pf-c-drawer--pf-c-drawer--child--PaddingTop
1rem
.pf-c-drawer--pf-c-drawer--child--PaddingRight
1rem
.pf-c-drawer--pf-c-drawer--child--PaddingBottom
1rem
.pf-c-drawer--pf-c-drawer--child--PaddingLeft
1rem
.pf-c-drawer--pf-c-drawer--child--md--PaddingTop
1.5rem
.pf-c-drawer--pf-c-drawer--child--md--PaddingRight
1.5rem
.pf-c-drawer--pf-c-drawer--child--md--PaddingBottom
1.5rem
.pf-c-drawer--pf-c-drawer--child--md--PaddingLeft
1.5rem
.pf-c-drawer--pf-c-drawer--child--m-padding--PaddingTop
1rem
.pf-c-drawer--pf-c-drawer--child--m-padding--PaddingRight
1rem
.pf-c-drawer--pf-c-drawer--child--m-padding--PaddingBottom
1rem
.pf-c-drawer--pf-c-drawer--child--m-padding--PaddingLeft
1rem
.pf-c-drawer--pf-c-drawer--child--m-padding--md--PaddingTop
1.5rem
.pf-c-drawer--pf-c-drawer--child--m-padding--md--PaddingRight
1.5rem
.pf-c-drawer--pf-c-drawer--child--m-padding--md--PaddingBottom
1.5rem
.pf-c-drawer--pf-c-drawer--child--m-padding--md--PaddingLeft
1.5rem
.pf-c-drawer--pf-c-drawer__content--child--PaddingTop
0
.pf-c-drawer--pf-c-drawer__content--child--PaddingRight
0
.pf-c-drawer--pf-c-drawer__content--child--PaddingBottom
0
.pf-c-drawer--pf-c-drawer__content--child--PaddingLeft
0
.pf-c-drawer--pf-c-drawer__splitter--Top
0
.pf-c-drawer--pf-c-drawer__splitter--Right
auto
.pf-c-drawer--pf-c-drawer__splitter--Bottom
0
.pf-c-drawer--pf-c-drawer__splitter--Left
0
.pf-c-drawer--pf-c-drawer__splitter--Height
0.5625rem
.pf-c-drawer--pf-c-drawer__splitter--Width
100%
.pf-c-drawer--pf-c-drawer__splitter--BackgroundColor
#fff
.pf-c-drawer--pf-c-drawer__splitter--Cursor
row-resize
.pf-c-drawer--pf-c-drawer__splitter--m-vertical--Height
100%
.pf-c-drawer--pf-c-drawer__splitter--m-vertical--Width
0.5625rem
.pf-c-drawer--pf-c-drawer__splitter--m-vertical--Cursor
col-resize
.pf-c-drawer--pf-c-drawer--m-inline__splitter--focus--OutlineOffset
-0.0625rem
.pf-c-drawer--pf-c-drawer__splitter--after--BorderColor
#d2d2d2
.pf-c-drawer--pf-c-drawer__splitter--after--border-width--base
1px
.pf-c-drawer--pf-c-drawer__splitter--after--BorderTopWidth
0
.pf-c-drawer--pf-c-drawer__splitter--after--BorderRightWidth
1px
.pf-c-drawer--pf-c-drawer__splitter--after--BorderBottomWidth
0
.pf-c-drawer--pf-c-drawer__splitter--after--BorderLeftWidth
0
.pf-c-drawer--pf-c-drawer--m-panel-left__splitter--after--BorderLeftWidth
1px
.pf-c-drawer--pf-c-drawer--m-panel-bottom__splitter--after--BorderBottomWidth
1px
.pf-c-drawer--pf-c-drawer--m-inline__splitter--m-vertical--Width
0.625rem
.pf-c-drawer--pf-c-drawer--m-inline__splitter-handle--Left
50%
.pf-c-drawer--pf-c-drawer--m-inline__splitter--after--BorderRightWidth
1px
.pf-c-drawer--pf-c-drawer--m-inline__splitter--after--BorderLeftWidth
1px
.pf-c-drawer--pf-c-drawer--m-inline--m-panel-bottom__splitter--Height
0.625rem
.pf-c-drawer--pf-c-drawer--m-inline--m-panel-bottom__splitter-handle--Top
50%
.pf-c-drawer--pf-c-drawer--m-inline--m-panel-bottom__splitter--after--BorderTopWidth
1px
.pf-c-drawer--pf-c-drawer__splitter-handle--Top
50%
.pf-c-drawer--pf-c-drawer__splitter-handle--Left
calc(50% - 1px)
.pf-c-drawer--pf-c-drawer--m-panel-left__splitter-handle--Left
50%
.pf-c-drawer--pf-c-drawer--m-panel-bottom__splitter-handle--Top
calc(50% - 1px)
.pf-c-drawer--pf-c-drawer__splitter-handle--after--BorderColor
#6a6e73
.pf-c-drawer--pf-c-drawer__splitter-handle--after--BorderTopWidth
1px
.pf-c-drawer--pf-c-drawer__splitter-handle--after--BorderRightWidth
0
.pf-c-drawer--pf-c-drawer__splitter-handle--after--BorderBottomWidth
1px
.pf-c-drawer--pf-c-drawer__splitter-handle--after--BorderLeftWidth
0
.pf-c-drawer--pf-c-drawer__splitter--hover__splitter-handle--after--BorderColor
#151515
.pf-c-drawer--pf-c-drawer__splitter--focus__splitter-handle--after--BorderColor
#151515
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--BorderTopWidth
0
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--BorderRightWidth
1px
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--BorderBottomWidth
0
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--BorderLeftWidth
1px
.pf-c-drawer--pf-c-drawer__splitter-handle--after--Width
0.75rem
.pf-c-drawer--pf-c-drawer__splitter-handle--after--Height
0.25rem
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--Width
0.25rem
.pf-c-drawer--pf-c-drawer__splitter--m-vertical__splitter-handle--after--Height
0.75rem
.pf-c-drawer--pf-c-drawer__actions--MarginTop
calc(pf-global--spacer--form-element * -1)
.pf-c-drawer--pf-c-drawer__actions--MarginRight
calc(pf-global--spacer--form-element * -1)
.pf-c-drawer--pf-c-drawer__panel--BoxShadow
none
.pf-c-drawer--pf-c-drawer--m-expanded__panel--BoxShadow
-0.75rem 0 0.75rem -0.5rem rgba(3, 3, 3, 0.18)
.pf-c-drawer--pf-c-drawer--m-expanded--m-panel-left__panel--BoxShadow
0.75rem 0 0.75rem -0.5rem rgba(3, 3, 3, 0.18)
.pf-c-drawer--pf-c-drawer--m-expanded--m-panel-bottom__panel--BoxShadow
0 -0.75rem 0.75rem -0.5rem rgba(3, 3, 3, 0.18)
.pf-c-drawer--pf-c-drawer__panel--after--Width
1px
.pf-c-drawer--pf-c-drawer--m-panel-bottom__panel--after--Height
1px
.pf-c-drawer--pf-c-drawer__panel--after--BackgroundColor
transparent
.pf-c-drawer--pf-c-drawer--m-inline--m-expanded__panel--after--BackgroundColor
#d2d2d2
.pf-c-drawer--pf-c-drawer--m-inline__panel--PaddingLeft
1px
.pf-c-drawer--pf-c-drawer--m-panel-left--m-inline__panel--PaddingRight
1px
.pf-c-drawer--pf-c-drawer--m-panel-bottom--m-inline__panel--PaddingTop
1px
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter--Height
100%
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter--Width
0.5625rem
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter--Cursor
col-resize
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--Width
0.25rem
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--Height
0.75rem
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--BorderTopWidth
0
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--BorderRightWidth
1px
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--BorderBottomWidth
0
.pf-c-drawer__splitter.pf-m-vertical--pf-c-drawer__splitter-handle--after--BorderLeftWidth
1px
.pf-c-drawer__splitter:hover--pf-c-drawer__splitter-handle--after--BorderColor
#151515
.pf-c-drawer__splitter:focus--pf-c-drawer__splitter-handle--after--BorderColor
#151515

View source on GitHub