Compass

Info alert:Beta feature

This beta component is currently under review and is still open for further evolution. It is available for use in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the PatternFly forum or via Slack. To learn more about the process, visit our about page or our Beta components page on GitHub.

Examples

Basic

In a basic compass layout, content can be passed to the following props to populate areas of the page:

  • header: content rendered in the top of the page. This will typically be a CompassHeader component to break the header into 3 areas consisting of a logo or brand, middle navigation, and profile.
  • sidebarStart: content rendered in the left side or start side of the page
  • main: content rendered in the center of the page. This will typically consist of a CompassMainHeader or CompassHero, along with a CompassContent filled with one or more CompassPanel components.
  • sidebarEnd: content rendered in the right side or end side of the page
  • footer: content rendered in the bottom of the page

The background image of the Compass and CompassHero may be customized by using their respective backgroundSrcLight and backgroundSrcDark props. The CompassHero also allows customization of a color gradient across its container by using the gradientLight and gradientDark props.

Nav
Profile
Sidebar start
Hero
Content title
Content
Sidebar end

Demo

Demo screenshot

Props

Compass

*required
NameTypeDefaultDescription
isFooterExpandedNo type infotrue
isHeaderExpandedNo type infotrue
isSidebarEndExpandedNo type infotrue
isSidebarStartExpandedNo type infotrue

CompassHeader

*required
NameTypeDefaultDescription

CompassContent

*required
NameTypeDefaultDescription

CompassHero

*required
NameTypeDefaultDescription

CompassMainHeader

*required
NameTypeDefaultDescription

CompassPanel

*required
NameTypeDefaultDescription

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v6-c-compass--pf-v6-c-compass--BackgroundImage
none
.pf-v6-c-compass--pf-v6-c-compass--BackgroundImage--light
none
.pf-v6-c-compass--pf-v6-c-compass--BackgroundImage--dark
none
.pf-v6-c-compass--pf-v6-c-compass--Padding
1.5rem
.pf-v6-c-compass--pf-v6-c-compass--RowGap
2rem
.pf-v6-c-compass--pf-v6-c-compass--ColumnGap
2rem
.pf-v6-c-compass--pf-v6-c-compass__nav--RowGap
0.5rem
.pf-v6-c-compass--pf-v6-c-compass__sidebar--Padding
0.5rem
.pf-v6-c-compass--pf-v6-c-compass__main--RowGap
1rem
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--rgb--light
255,255,255
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--opacity--light
.8
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--light
(In light theme) rgba(255,255,255, .8)
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--rgb--dark
0,0,0
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--opacity--dark
.8
.pf-v6-c-compass--pf-v6-c-compass__panel--BackgroundColor--dark
(In light theme) rgba(0,0,0, .8)
.pf-v6-c-compass--pf-v6-c-compass__panel--BackdropFilter
blur(75px)
.pf-v6-c-compass--pf-v6-c-compass__panel--BackdropFilter--light
blur(75px)
.pf-v6-c-compass--pf-v6-c-compass__panel--BackdropFilter--dark
blur(75px)
.pf-v6-c-compass--pf-v6-c-compass__panel--BorderRadius
24px
.pf-v6-c-compass--pf-v6-c-compass__panel--m-pill--BorderRadius
999px
.pf-v6-c-compass--pf-v6-c-compass__panel--Padding
1.5rem
.pf-v6-c-compass--pf-v6-c-compass__panel--BorderWidth
1px
.pf-v6-c-compass--pf-v6-c-compass__panel--BorderColor
(In light theme) #ffffff
.pf-v6-c-compass--pf-v6-c-compass__panel--BoxShadow
0px 4px 9px 0px rgba(41, 41, 41, 0.1500)
.pf-v6-c-compass--pf-v6-c-compass__message-bar--Width
450px
.pf-v6-c-compass--pf-v6-c-compass__message-bar--MinWidth
300px
.pf-v6-c-compass--pf-v6-c-compass__message-bar--MaxWidth
600px
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--angle
109deg
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-1--light
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-2--light
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-3--light
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-1--dark
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-2--dark
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--gradient--stop-3--dark
transparent
.pf-v6-c-compass--pf-v6-c-compass__hero--BackgroundImage--light
none
.pf-v6-c-compass--pf-v6-c-compass__hero--BackgroundImage--dark
none
.pf-v6-c-compass--pf-v6-c-compass__hero-body--Width
800px
.pf-v6-c-compass--pf-v6-c-compass__hero-body--MaxWidth
80%
.pf-v6-c-compass__sidebar--pf-v6-c-compass__panel--Padding
0.5rem
:where(:root.pf-v6-theme-no-glass) .pf-v6-c-compass--pf-v6-c-compass--glass--opacity
100%
:where(:root.pf-v6-theme-no-glass) .pf-v6-c-compass--pf-v6-c-compass--glass--border
(In light theme) #c7c7c7
:where(:root.pf-v6-theme-no-glass) .pf-v6-c-compass--pf-v6-c-compass--glass--blend-mode
none
:where(:root.pf-v6-theme-no-glass) .pf-v6-c-compass--pf-v6-c-compass--glass--blend-mode--dark
none