Sidebar

Examples

Basic

Sidebar panel

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Stack

Sidebar panel stacked on top

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Panel right with gutter

Sidebar panel on the right

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Sticky panel

A tabIndex should be added to the Sidebar when there is scrollable content in order for the overflow content to be accessible by keyboard.

Sticky sidebar panel

Scroll me!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Static panel

A tabIndex should be added to the Sidebar when there is scrollable content in order for the overflow content to be accessible by keyboard.

Static sidebar panel

Scroll me!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Responsive panel width

A tabIndex should be added to the Sidebar when there is scrollable content in order for the overflow content to be accessible by keyboard.

Sidebar panel

Resize me!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Border

Sidebar panel

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Padding on panel

Sidebar panel, with padding

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Padding on content

Sidebar panel

Sidebar content, with padding.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dapibus nulla id augue dictum commodo. Donec mollis arcu massa, sollicitudin venenatis est rutrum vitae. Integer pulvinar ligula at augue mollis, ac pulvinar arcu semper. Maecenas nisi lorem, malesuada ac lectus nec, porta pretium neque. Ut convallis libero sit amet metus mattis, vel facilisis lorem malesuada. Duis consectetur ante sit amet magna efficitur, a interdum leo vulputate.

Praesent at odio nec sapien ultrices tincidunt in non mauris. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis consectetur nisl quis facilisis faucibus. Sed eu bibendum risus. Suspendisse porta euismod tortor, at elementum odio suscipit sed. Cras eget ultrices urna, ac feugiat lectus. Integer a pharetra velit, in imperdiet mi. Phasellus vel hendrerit velit. Vestibulum ut augue vitae erat vulputate bibendum a ut magna.

Props

*required
NameTypeDefaultDescription
childrenReact.ReactNode
hasBorderbooleanAdds a border between the panel and content.
hasGutterbooleanAdds space between the panel and content.
hasNoBackgroundbooleanRemoves the background color.
isPanelRightbooleanfalseIndicates that the panel is displayed to the right of the content when the oritentation is split.
orientation'stack' | 'split'Indicates the direction of the layout. Default orientation is stack on small screens, and split on medium screens and above.

SidebarContent

*required
NameTypeDefaultDescription
childrenrequiredReact.ReactNode
backgroundVariant'default' | 'secondary''default'Variant of the sidebar content background.
hasNoBackgroundbooleanRemoves the background color.
hasPaddingbooleanAdds padding to the content.

SidebarPanel

*required
NameTypeDefaultDescription
childrenrequiredReact.ReactNode
backgroundVariant'default' | 'secondary''default'Variant of the sidebar panel background.
hasNoBackgroundbooleanRemoves the background color.
hasPaddingbooleanAdds padding to the panel.
variant'default' | 'sticky' | 'static''default'Indicates whether the panel is positioned statically or sticky to the top. Default is sticky on small screens when the orientation is stack, and static on medium and above screens when the orientation is split.
width{ default?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; sm?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; md?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; lg?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; xl?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; '2xl'?: 'default' | 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100'; }Sets the panel width at various breakpoints. Default is 250px when the orientation is split.

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v6-c-sidebar--pf-v6-c-sidebar--inset
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar--xl--inset
1.5rem
.pf-v6-c-sidebar--pf-v6-c-sidebar--BorderWidth--base
1px
.pf-v6-c-sidebar--pf-v6-c-sidebar--BorderColor--base
(In light theme) #c7c7c7
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--PaddingBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--PaddingInlineEnd
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--PaddingBlockEnd
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--PaddingInlineStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--Order
-1
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-padding--PaddingBlockStart
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-padding--PaddingInlineEnd
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-padding--PaddingBlockEnd
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-padding--PaddingInlineStart
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--PaddingBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--PaddingInlineEnd
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--PaddingBlockEnd
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--PaddingInlineStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--Order
1
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--m-padding--PaddingBlockStart
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--m-padding--PaddingInlineEnd
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--m-padding--PaddingBlockEnd
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--m-padding--PaddingInlineStart
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--FlexDirection
column
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--md--FlexDirection
row
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--AlignItems
stretch
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--md--AlignItems
flex-start
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--child--MarginBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-gutter__main--Gap
1rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--m-border--before--Display
none
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--m-border--before--md--Display
block
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--m-border--before--BorderWidth
1px
.pf-v6-c-sidebar--pf-v6-c-sidebar__main--m-border--before--BorderColor
(In light theme) #c7c7c7
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-panel-right__panel--Order
-1
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-panel-right__panel--md--Order
1
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-panel-right__content--md--Order
-1
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack__main--FlexDirection
column
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack__main--AlignItems
stretch
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack__panel--Position
sticky
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack__panel--InsetBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack__panel--BoxShadow
0px 10px 9px -8px rgba(41, 41, 41, 0.1500)
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-stack--m-panel-right__panel--Order
-1
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split__main--AlignItems
flex-start
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split__main--FlexDirection
row
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split__panel--Position
static
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split__panel--InsetBlockStart
auto
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split--m-panel-right__panel--Order
1
.pf-v6-c-sidebar--pf-v6-c-sidebar--m-split__main--m-border--before--Display
block
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--FlexBasis-base
auto
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--BoxShadow--base
0px 10px 9px -8px rgba(41, 41, 41, 0.1500)
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--BoxShadow
0px 10px 9px -8px rgba(41, 41, 41, 0.1500)
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--InsetBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--md--InsetBlockStart
auto
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--Position
sticky
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--md--Position
static
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--FlexBasis
auto
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--md--FlexBasis
15.625rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-split--FlexBasis
15.625rem
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-stack--FlexBasis
auto
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--ZIndex
100
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--BackgroundColor
(In light theme) #ffffff
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-secondary--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--BackgroundColor
(In light theme) #ffffff
.pf-v6-c-sidebar--pf-v6-c-sidebar__content--m-secondary--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-sticky--InsetBlockStart
0
.pf-v6-c-sidebar--pf-v6-c-sidebar__panel--m-sticky--Position
sticky
.pf-v6-c-sidebar.pf-m-panel-right--pf-v6-c-sidebar__panel--Order
-1
.pf-v6-c-sidebar.pf-m-panel-right--pf-v6-c-sidebar__content--Order
undefined
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__main--FlexDirection
column
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__main--AlignItems
stretch
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__panel--Position
sticky
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__panel--InsetBlockStart
0
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__panel--BoxShadow
0px 10px 9px -8px rgba(41, 41, 41, 0.1500)
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__panel--FlexBasis
auto
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar__main--m-border--before--Display
none
.pf-v6-c-sidebar.pf-m-stack--pf-v6-c-sidebar--m-panel-right__panel--Order
-1
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__main--FlexDirection
row
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__main--AlignItems
flex-start
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__panel--Position
static
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__panel--InsetBlockStart
auto
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__panel--BoxShadow
none
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__panel--FlexBasis
15.625rem
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar__main--m-border--before--Display
block
.pf-v6-c-sidebar.pf-m-split--pf-v6-c-sidebar--m-panel-right__panel--Order
1
.pf-v6-c-sidebar__panel.pf-m-padding--pf-v6-c-sidebar__panel--PaddingBlockStart
1rem
.pf-v6-c-sidebar__panel.pf-m-padding--pf-v6-c-sidebar__panel--PaddingInlineEnd
1rem
.pf-v6-c-sidebar__panel.pf-m-padding--pf-v6-c-sidebar__panel--PaddingBlockEnd
1rem
.pf-v6-c-sidebar__panel.pf-m-padding--pf-v6-c-sidebar__panel--PaddingInlineStart
1rem
.pf-v6-c-sidebar__panel.pf-m-sticky--pf-v6-c-sidebar__panel--Position
sticky
.pf-v6-c-sidebar__panel.pf-m-sticky--pf-v6-c-sidebar__panel--InsetBlockStart
0
.pf-v6-c-sidebar__panel.pf-m-static--pf-v6-c-sidebar__panel--Position
static
.pf-v6-c-sidebar__panel.pf-m-static--pf-v6-c-sidebar__panel--InsetBlockStart
auto
.pf-v6-c-sidebar__panel.pf-m-secondary--pf-v6-c-sidebar__panel--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-sidebar__content.pf-m-padding--pf-v6-c-sidebar__content--PaddingBlockStart
1rem
.pf-v6-c-sidebar__content.pf-m-padding--pf-v6-c-sidebar__content--PaddingInlineEnd
1rem
.pf-v6-c-sidebar__content.pf-m-padding--pf-v6-c-sidebar__content--PaddingBlockEnd
1rem
.pf-v6-c-sidebar__content.pf-m-padding--pf-v6-c-sidebar__content--PaddingInlineStart
1rem
.pf-v6-c-sidebar__content.pf-m-no-background--pf-v6-c-sidebar__content--BackgroundColor
transparent
.pf-v6-c-sidebar__content.pf-m-secondary--pf-v6-c-sidebar__content--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-sidebar__content + .pf-v6-c-sidebar__panel--pf-v6-c-sidebar__panel--Order
1
:where(.pf-v6-c-sidebar__content:first-child)--pf-v6-c-sidebar__content--Order
-1
.pf-v6-c-sidebar__panel.pf-m-width-default--pf-v6-c-sidebar__panel--FlexBasis
auto
.pf-v6-c-sidebar__panel.pf-m-width-25--pf-v6-c-sidebar__panel--FlexBasis
25%
.pf-v6-c-sidebar__panel.pf-m-width-33--pf-v6-c-sidebar__panel--FlexBasis
33%
.pf-v6-c-sidebar__panel.pf-m-width-50--pf-v6-c-sidebar__panel--FlexBasis
50%
.pf-v6-c-sidebar__panel.pf-m-width-66--pf-v6-c-sidebar__panel--FlexBasis
66%
.pf-v6-c-sidebar__panel.pf-m-width-75--pf-v6-c-sidebar__panel--FlexBasis
75%
.pf-v6-c-sidebar__panel.pf-m-width-100--pf-v6-c-sidebar__panel--FlexBasis
100%