Examples
Documentation
Usage
Class | Applied to | Outcome |
---|---|---|
.pf-v5-c-sidebar | <div> | Initiates the sidebar component. Required |
.pf-v5-c-sidebar__main | <div> | Initiates the sidebar main element. Required |
.pf-v5-c-sidebar__panel | <div> | Initiates the sidebar panel element. Required |
.pf-v5-c-sidebar__content | <div> | Initiates the sidebar content element. Required |
.pf-m-border | .pf-v5-c-sidebar__main | Modifies the sidebar component to add a border between the panel and content. |
.pf-m-padding | .pf-v5-c-sidebar__panel , .pf-v5-c-sidebar__content | Modifies the sidebar component to add a padding to panel and/or content. |
.pf-m-gutter | .pf-v5-c-sidebar | Modifies the sidebar component to add a gutter between the panel and content. |
.pf-m-stack | .pf-v5-c-sidebar | Modifies the sidebar to stack the panel on top of the content. |
.pf-m-split | .pf-v5-c-sidebar | Modifies the sidebar to position the panel and content side by side. |
.pf-m-panel-right | .pf-v5-c-sidebar | Modifies the sidebar to place the panel to the right of the content. |
.pf-m-sticky | .pf-v5-c-sidebar__panel | Modifies the panel to be sticky to the top of the layout. |
.pf-m-static | .pf-v5-c-sidebar__panel | Modifies the panel to be positioned statically. |
.pf-m-width-{default, 25, 33, 50, 66, 75, 100}{-on-[breakpoint]} | .pf-v5-c-sidebar__panel | Modifies the panel width at optional breakpoint. Note: does not apply when the panel is stacked on top of the content. |
.pf-m-no-background | .pf-v5-c-sidebar , .pf-v5-c-sidebar__panel, .pf-v5-c-sidebar__content | Modifies the element to have a transparent background. |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v5-c-sidebar | --pf-v5-c-sidebar--inset | 1rem | ||
--pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--xl--inset | 1.5rem | ||
--pf-v5-c-sidebar--xl--inset --pf-v5-global--spacer--lg $pf-v5-global--spacer--lg pf-size-prem(24px) 1.5rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--BackgroundColor | #fff | ||
--pf-v5-c-sidebar--BackgroundColor --pf-v5-global--BackgroundColor--100 $pf-v5-global--BackgroundColor--100 $pf-v5-color-white #fff | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--BorderWidth--base | 1px | ||
--pf-v5-c-sidebar--BorderWidth--base --pf-v5-global--BorderWidth--sm $pf-v5-global--BorderWidth--sm 1px | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--BorderColor--base | #d2d2d2 | ||
--pf-v5-c-sidebar--BorderColor--base --pf-v5-global--BorderColor--100 $pf-v5-global--BorderColor--100 $pf-v5-color-black-300 #d2d2d2 | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--PaddingTop | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--PaddingRight | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--PaddingBottom | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--PaddingLeft | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--Order | -1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-padding--PaddingTop | 1rem | ||
--pf-v5-c-sidebar__panel--m-padding--PaddingTop --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-padding--PaddingRight | 1rem | ||
--pf-v5-c-sidebar__panel--m-padding--PaddingRight --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-padding--PaddingBottom | 1rem | ||
--pf-v5-c-sidebar__panel--m-padding--PaddingBottom --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-padding--PaddingLeft | 1rem | ||
--pf-v5-c-sidebar__panel--m-padding--PaddingLeft --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--PaddingTop | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--PaddingRight | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--PaddingBottom | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--PaddingLeft | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--Order | 1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--m-padding--PaddingTop | 1rem | ||
--pf-v5-c-sidebar__content--m-padding--PaddingTop --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--m-padding--PaddingRight | 1rem | ||
--pf-v5-c-sidebar__content--m-padding--PaddingRight --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--m-padding--PaddingBottom | 1rem | ||
--pf-v5-c-sidebar__content--m-padding--PaddingBottom --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--m-padding--PaddingLeft | 1rem | ||
--pf-v5-c-sidebar__content--m-padding--PaddingLeft --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--FlexDirection | column | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--md--FlexDirection | row | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--AlignItems | stretch | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--md--AlignItems | flex-start | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--child--MarginTop | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-gutter__main--Gap | 1rem | ||
--pf-v5-c-sidebar--m-gutter__main--Gap --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--m-border--before--Display | none | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--m-border--before--md--Display | block | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--m-border--before--BorderWidth | 1px | ||
--pf-v5-c-sidebar__main--m-border--before--BorderWidth --pf-v5-c-sidebar--BorderWidth--base --pf-v5-global--BorderWidth--sm $pf-v5-global--BorderWidth--sm 1px | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__main--m-border--before--BorderColor | #d2d2d2 | ||
--pf-v5-c-sidebar__main--m-border--before--BorderColor --pf-v5-c-sidebar--BorderColor--base --pf-v5-global--BorderColor--100 $pf-v5-global--BorderColor--100 $pf-v5-color-black-300 #d2d2d2 | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-panel-right__panel--Order | -1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-panel-right__panel--md--Order | 1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-panel-right__content--md--Order | -1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack__main--FlexDirection | column | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack__main--AlignItems | stretch | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack__panel--Position | sticky | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack__panel--Top | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack__panel--BoxShadow | 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||
--pf-v5-c-sidebar--m-stack__panel--BoxShadow --pf-v5-c-sidebar__panel--BoxShadow--base 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-stack--m-panel-right__panel--Order | -1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split__main--AlignItems | flex-start | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split__main--FlexDirection | row | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split__panel--Position | static | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split__panel--Top | auto | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split--m-panel-right__panel--Order | 1 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar--m-split__main--m-border--before--Display | block | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--FlexBasis-base | auto | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--BoxShadow--base | 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--BoxShadow | 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||
--pf-v5-c-sidebar__panel--BoxShadow --pf-v5-c-sidebar__panel--BoxShadow--base 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--Top | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--md--Top | auto | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--Position | sticky | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--md--Position | static | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--FlexBasis | auto | ||
--pf-v5-c-sidebar__panel--FlexBasis --pf-v5-c-sidebar__panel--FlexBasis-base auto | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--md--FlexBasis | 15.625rem | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-split--FlexBasis | 15.625rem | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-stack--FlexBasis | auto | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--ZIndex | 100 | ||
--pf-v5-c-sidebar__panel--ZIndex --pf-v5-global--ZIndex--xs $pf-v5-global--ZIndex--xs 100 | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--BackgroundColor | #fff | ||
--pf-v5-c-sidebar__panel--BackgroundColor --pf-v5-global--BackgroundColor--100 $pf-v5-global--BackgroundColor--100 $pf-v5-color-white #fff | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__content--BackgroundColor | #fff | ||
--pf-v5-c-sidebar__content--BackgroundColor --pf-v5-global--BackgroundColor--100 $pf-v5-global--BackgroundColor--100 $pf-v5-color-white #fff | ||||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-sticky--Top | 0 | ||
.pf-v5-c-sidebar | --pf-v5-c-sidebar__panel--m-sticky--Position | sticky | ||
.pf-v5-c-sidebar.pf-m-panel-right | --pf-v5-c-sidebar__panel--Order | -1 | ||
--pf-v5-c-sidebar__panel--Order --pf-v5-c-sidebar--m-panel-right__panel--Order -1 | ||||
.pf-v5-c-sidebar.pf-m-panel-right | --pf-v5-c-sidebar__content--Order | undefined | ||
--pf-v5-c-sidebar__content--Order --pf-v5-c-sidebar--m-panel-right__content--Order undefined | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__main--FlexDirection | column | ||
--pf-v5-c-sidebar__main--FlexDirection --pf-v5-c-sidebar--m-stack__main--FlexDirection column | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__main--AlignItems | stretch | ||
--pf-v5-c-sidebar__main--AlignItems --pf-v5-c-sidebar--m-stack__main--AlignItems stretch | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__panel--Position | sticky | ||
--pf-v5-c-sidebar__panel--Position --pf-v5-c-sidebar--m-stack__panel--Position sticky | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__panel--Top | 0 | ||
--pf-v5-c-sidebar__panel--Top --pf-v5-c-sidebar--m-stack__panel--Top 0 | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__panel--BoxShadow | 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||
--pf-v5-c-sidebar__panel--BoxShadow --pf-v5-c-sidebar--m-stack__panel--BoxShadow --pf-v5-c-sidebar__panel--BoxShadow--base 0 0.25rem 0.25rem -0.25rem rgba(3, 3, 3, 0.16) | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__panel--FlexBasis | auto | ||
--pf-v5-c-sidebar__panel--FlexBasis --pf-v5-c-sidebar__panel--m-stack--FlexBasis auto | ||||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar__main--m-border--before--Display | none | ||
.pf-v5-c-sidebar.pf-m-stack | --pf-v5-c-sidebar--m-panel-right__panel--Order | -1 | ||
--pf-v5-c-sidebar--m-panel-right__panel--Order --pf-v5-c-sidebar--m-stack--m-panel-right__panel--Order -1 | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__main--FlexDirection | row | ||
--pf-v5-c-sidebar__main--FlexDirection --pf-v5-c-sidebar--m-split__main--FlexDirection row | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__main--AlignItems | flex-start | ||
--pf-v5-c-sidebar__main--AlignItems --pf-v5-c-sidebar--m-split__main--AlignItems flex-start | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__panel--Position | static | ||
--pf-v5-c-sidebar__panel--Position --pf-v5-c-sidebar--m-split__panel--Position static | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__panel--Top | auto | ||
--pf-v5-c-sidebar__panel--Top --pf-v5-c-sidebar--m-split__panel--Top auto | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__panel--BoxShadow | none | ||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__panel--FlexBasis | 15.625rem | ||
--pf-v5-c-sidebar__panel--FlexBasis --pf-v5-c-sidebar__panel--m-split--FlexBasis 15.625rem | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar__main--m-border--before--Display | block | ||
--pf-v5-c-sidebar__main--m-border--before--Display --pf-v5-c-sidebar--m-split__main--m-border--before--Display block | ||||
.pf-v5-c-sidebar.pf-m-split | --pf-v5-c-sidebar--m-panel-right__panel--Order | 1 | ||
--pf-v5-c-sidebar--m-panel-right__panel--Order --pf-v5-c-sidebar--m-split--m-panel-right__panel--Order 1 | ||||
.pf-v5-c-sidebar__panel.pf-m-padding | --pf-v5-c-sidebar__panel--PaddingTop | 1rem | ||
--pf-v5-c-sidebar__panel--PaddingTop --pf-v5-c-sidebar__panel--m-padding--PaddingTop --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__panel.pf-m-padding | --pf-v5-c-sidebar__panel--PaddingRight | 1rem | ||
--pf-v5-c-sidebar__panel--PaddingRight --pf-v5-c-sidebar__panel--m-padding--PaddingRight --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__panel.pf-m-padding | --pf-v5-c-sidebar__panel--PaddingBottom | 1rem | ||
--pf-v5-c-sidebar__panel--PaddingBottom --pf-v5-c-sidebar__panel--m-padding--PaddingBottom --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__panel.pf-m-padding | --pf-v5-c-sidebar__panel--PaddingLeft | 1rem | ||
--pf-v5-c-sidebar__panel--PaddingLeft --pf-v5-c-sidebar__panel--m-padding--PaddingLeft --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__panel.pf-m-sticky | --pf-v5-c-sidebar__panel--Position | sticky | ||
--pf-v5-c-sidebar__panel--Position --pf-v5-c-sidebar__panel--m-sticky--Position sticky | ||||
.pf-v5-c-sidebar__panel.pf-m-sticky | --pf-v5-c-sidebar__panel--Top | 0 | ||
--pf-v5-c-sidebar__panel--Top --pf-v5-c-sidebar__panel--m-sticky--Top 0 | ||||
.pf-v5-c-sidebar__panel.pf-m-static | --pf-v5-c-sidebar__panel--Position | static | ||
.pf-v5-c-sidebar__panel.pf-m-static | --pf-v5-c-sidebar__panel--Top | auto | ||
.pf-v5-c-sidebar__content.pf-m-padding | --pf-v5-c-sidebar__content--PaddingTop | 1rem | ||
--pf-v5-c-sidebar__content--PaddingTop --pf-v5-c-sidebar__content--m-padding--PaddingTop --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__content.pf-m-padding | --pf-v5-c-sidebar__content--PaddingRight | 1rem | ||
--pf-v5-c-sidebar__content--PaddingRight --pf-v5-c-sidebar__content--m-padding--PaddingRight --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__content.pf-m-padding | --pf-v5-c-sidebar__content--PaddingBottom | 1rem | ||
--pf-v5-c-sidebar__content--PaddingBottom --pf-v5-c-sidebar__content--m-padding--PaddingBottom --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__content.pf-m-padding | --pf-v5-c-sidebar__content--PaddingLeft | 1rem | ||
--pf-v5-c-sidebar__content--PaddingLeft --pf-v5-c-sidebar__content--m-padding--PaddingTop --pf-v5-c-sidebar--inset --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-sidebar__content.pf-m-no-background | --pf-v5-c-sidebar__content--BackgroundColor | transparent | ||
.pf-v5-c-sidebar__content + .pf-v5-c-sidebar__panel | --pf-v5-c-sidebar__panel--Order | 1 | ||
:where(.pf-v5-c-sidebar__content:first-child) | --pf-v5-c-sidebar__content--Order | -1 | ||
.pf-v5-c-sidebar__panel.pf-m-width-default | --pf-v5-c-sidebar__panel--FlexBasis | auto | ||
--pf-v5-c-sidebar__panel--FlexBasis --pf-v5-c-sidebar__panel--FlexBasis--base auto | ||||
.pf-v5-c-sidebar__panel.pf-m-width-25 | --pf-v5-c-sidebar__panel--FlexBasis | 25% | ||
.pf-v5-c-sidebar__panel.pf-m-width-33 | --pf-v5-c-sidebar__panel--FlexBasis | 33% | ||
.pf-v5-c-sidebar__panel.pf-m-width-50 | --pf-v5-c-sidebar__panel--FlexBasis | 50% | ||
.pf-v5-c-sidebar__panel.pf-m-width-66 | --pf-v5-c-sidebar__panel--FlexBasis | 66% | ||
.pf-v5-c-sidebar__panel.pf-m-width-75 | --pf-v5-c-sidebar__panel--FlexBasis | 75% | ||
.pf-v5-c-sidebar__panel.pf-m-width-100 | --pf-v5-c-sidebar__panel--FlexBasis | 100% |
View source on GitHub