Skip to content
Patternfly Logo

Menu

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.

Examples

Basic

With icons

With expanded toggle

With flyout

With flyout menu top

With flyout menu left

With flyout menu left top

Drilldown

Drilldown level two

Drilldown level three

Drilldown level four

Scrollable drilldown

Width modified drilldown

Drilldown with breadcrumbs - level 1

Drilldown with breadcrumbs - level 2


Drilldown with breadcrumbs - level 3


Drilldown with breadcrumbs - level 4


With filtering


With separator(s)

With titled groups

With description

With actions

Actions

Option single select

Option multi-select

View more

Loading

Documentation

Overview

Accessibility

Attribute
Applied
Outcome
disabled
button.pf-c-menu__item
When the menu item uses a button element, indicates that it is unavailable and removes it from keyboard focus.
aria-disabled="true"
a.pf-c-menu__item
When the menu item uses a link element, removes it from keyboard focus.
tabindex="-1"
a.pf-c-menu__item
When the menu item uses a link element, removes it from keyboard focus.
aria-hidden="true"
.pf-c-menu__item-icon, .pf-c-menu__item-action-icon, .pf-c-menu__item-external-icon, .pf-c-menu__item-toggle-icon, .pf-c-menu__item-select-icon
Hides the icon from assistive technologies.
aria-label="Not starred"
.pf-c-menu__item-action-icon.pf-m-favorite
Provides an accessible label indicating that the favorite action is not selected.
aria-label="Starred"
.pf-c-menu__item-action-icon.pf-m-favorite.pf-m-favorited
Provides an accessible label indicating that the favorite action is selected.

Usage

Class
Applied to
Outcome
.pf-c-menu
<div>
Initiates the menu. Required
.pf-c-menu__header
<div>
Initiates the menu header container.
.pf-c-menu__search
<div>
Initiates the menu search container. Use for filtering.
.pf-c-menu__search-input
<div>
Initiates the menu search input container.
.pf-c-menu__content
<div>
Initiates the menu content. Use for lists. Required
.pf-c-menu__list
<ul>
Initiates the menu list. Required
.pf-c-menu__list-item
<li>
Initiates the menu list item. Required
.pf-c-menu__item
<button>, <a>, <div>
Initiates the menu item. Required
.pf-c-menu__item-main
<span>
Initiates the menu item main container. Required
.pf-c-menu__item-text
<span>
Initiates the menu item text. Required
.pf-c-menu__item-description
<span>
Initiates the menu item description.
.pf-c-menu__item-group
<section>
Initiates the menu item group.
.pf-c-menu__item-group-title
<h1>
Initiates the menu item group title.
.pf-c-menu__item-icon
<span>
Initiates the menu item icon.
.pf-c-menu__item-toggle-icon
<span>
Initiates the menu item toggle icon.
.pf-c-menu__item-select-icon
<span>
Initiates the menu item select icon.
.pf-c-menu__item-action
<button>
Initiates the menu item action.
.pf-c-menu__item-action-icon
<span>
Initiates the menu item action icon.
.pf-c-menu__item-external-icon
<span>
Initiates the menu item external icon.
.pf-c-menu__footer
<div>
Initiates the menu footer.
.pf-m-hidden{-on-[breakpoint]}
.pf-c-menu__list, .pf-c-menu__list-item, .pf-c-menu__group
Modifies a menu element to be hidden, at optional breakpoint.
.pf-m-visible{-on-[breakpoint]}
.pf-c-menu__list, .pf-c-menu__list-item, .pf-c-menu__group
Modifies a menu element to be shown, at optional breakpoint.
.pf-m-favorite
.pf-c-menu__item-action
Modifies the menu item action to handle the favorite icon.
.pf-m-favorited
.pf-c-menu__item-action.pf-m-favorite
Modifies the menu item action icon to be favorited.
.pf-m-selected
.pf-c-menu__item
Modifies the menu item to be selected.
.pf-m-flyout
.pf-c-menu
Modifies the menu so that all nested .pf-c-menu elements "flyout".
.pf-m-top
.pf-c-menu
Modifies a flyout menu to expand to the top.
.pf-m-left
.pf-c-menu
Modifies a flyout menu to expand to the left.
.pf-m-load
.pf-c-menu__list-item
Modifies a list item for "load more" styles.
.pf-m-loading
.pf-c-menu__list-item
Modifies a list item for loading styles.
.pf-m-drilldown
.pf-c-menu
Modifies the menu so that all nested .pf-c-menu elements "drill down".
.pf-m-current-path
.pf-c-menu.pf-m-drilldown .pf-c-menu__list-item
Modifies the menu list item for current path state.
.pf-m-drilled-in
.pf-c-menu.pf-m-drilldown, .pf-c-menu.pf-m-drilldown .pf-c-menu
Modifies the menu list for drilled in state.
.pf-m-static
.pf-c-menu.pf-m-drilldown .pf-c-menu
Modifies the menu list for drilled static state.
--pf-c-menu--Width: {width}
.pf-c-menu
Modifies the width of the menu. The default value is auto.
--pf-c-menu__content--MaxHeight: {height}
.pf-c-menu__content
Modifies the height of the menu content. Update this value when header and/or footer elements are intended to be fixed.
--pf-c-menu__content--Height: {height}
.pf-c-menu
Modifies the height of the drilldown menu content. The default value is auto.
--pf-c-menu--m-flyout__menu--top-offset
.pf-c-menu
Modifies the menu to allow for an offset to the top positioning.
--pf-c-menu--m-flyout__menu--left-offset
.pf-c-menu
Modifies the menu to allow for an offset to the left positioning.
--pf-c-menu--m-flyout__menu--m-left--right-offset
.pf-c-menu.pf-m-flyout > .pf-c-menu
Modifies the menu to allow for an offset to the right positioning.

CSS variables

.pf-c-menu--pf-global--Color--100
#151515
.pf-c-menu--pf-global--Color--200
#6a6e73
.pf-c-menu--pf-global--BorderColor--100
#d2d2d2
.pf-c-menu--pf-global--primary-color--100
#06c
.pf-c-menu--pf-global--link--Color
#06c
.pf-c-menu--pf-global--link--Color--hover
#004080
.pf-c-menu--pf-global--BackgroundColor--100
#fff
.pf-c-menu--pf-c-menu--BackgroundColor
#fff
.pf-c-menu--pf-c-menu--BoxShadow
0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)
.pf-c-menu--pf-c-menu--MinWidth
100%
.pf-c-menu--pf-c-menu--Width
auto
.pf-c-menu--pf-c-menu--ZIndex
200
.pf-c-menu--pf-c-menu--m-flyout__menu--Top
calc(0.5rem * -1 + 0px)
.pf-c-menu--pf-c-menu--m-flyout__menu--Left
calc(100% + 0px)
.pf-c-menu--pf-c-menu--m-flyout__menu--m-top--Bottom
calc(0.5rem * -1)
.pf-c-menu--pf-c-menu--m-flyout__menu--m-left--Right
calc(100% + 0px)
.pf-c-menu--pf-c-menu--m-flyout__menu--top-offset
0px
.pf-c-menu--pf-c-menu--m-flyout__menu--left-offset
0px
.pf-c-menu--pf-c-menu--m-flyout__menu--m-left--right-offset
0px
.pf-c-menu--pf-c-menu__content--Height
auto
.pf-c-menu--pf-c-menu__list--c-divider--MarginTop
0.5rem
.pf-c-menu--pf-c-menu__list--c-divider--MarginBottom
0.5rem
.pf-c-menu--pf-c-menu__header--PaddingTop
1rem
.pf-c-menu--pf-c-menu__header--PaddingRight
1rem
.pf-c-menu--pf-c-menu__header--PaddingBottom
1rem
.pf-c-menu--pf-c-menu__header--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__search--PaddingTop
1rem
.pf-c-menu--pf-c-menu__search--PaddingRight
1rem
.pf-c-menu--pf-c-menu__search--PaddingBottom
1rem
.pf-c-menu--pf-c-menu__search--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__list--PaddingTop
0.5rem
.pf-c-menu--pf-c-menu__list--PaddingBottom
0.5rem
.pf-c-menu--pf-c-menu__list-item--Color
#151515
.pf-c-menu--pf-c-menu__list-item--BackgroundColor
transparent
.pf-c-menu--pf-c-menu__list-item--hover--BackgroundColor
#f0f0f0
.pf-c-menu--pf-c-menu__list-item--focus-within--BackgroundColor
#f0f0f0
.pf-c-menu--pf-c-menu__list-item--m-loading--PaddingTop
0.5rem
.pf-c-menu--pf-c-menu__item--PaddingTop
0.5rem
.pf-c-menu--pf-c-menu__item--PaddingRight
1rem
.pf-c-menu--pf-c-menu__item--PaddingBottom
0.5rem
.pf-c-menu--pf-c-menu__item--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__item--OutlineOffset
calc(0.125rem * -1)
.pf-c-menu--pf-c-menu__item--FontSize
1rem
.pf-c-menu--pf-c-menu__item--FontWeight
400
.pf-c-menu--pf-c-menu__item--LineHeight
1.5
.pf-c-menu--pf-c-menu__list-item--m-disabled__item--Color
#6a6e73
.pf-c-menu--pf-c-menu__list-item--m-load__item--Color
#06c
.pf-c-menu--pf-c-menu__group-title--PaddingTop
1rem
.pf-c-menu--pf-c-menu__group-title--PaddingRight
1rem
.pf-c-menu--pf-c-menu__group-title--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__group-title--FontSize
0.875rem
.pf-c-menu--pf-c-menu__group-title--FontWeight
700
.pf-c-menu--pf-c-menu__group-title--Color
#6a6e73
.pf-c-menu--pf-c-menu__item-description--FontSize
0.75rem
.pf-c-menu--pf-c-menu__item-description--Color
#6a6e73
.pf-c-menu--pf-c-menu__item-icon--MarginRight
0.5rem
.pf-c-menu--pf-c-menu__item-toggle-icon--PaddingRight
0.5rem
.pf-c-menu--pf-c-menu__item-toggle-icon--PaddingLeft
0.5rem
.pf-c-menu--pf-c-menu__list-item--m-disabled__item-toggle-icon--Color
#d2d2d2
.pf-c-menu--pf-c-menu__item-text--item-toggle-icon--MarginLeft
0.5rem
.pf-c-menu--pf-c-menu__item-toggle-icon--item-text--MarginLeft
0.5rem
.pf-c-menu--pf-c-menu__item-select-icon--MarginLeft
0.5rem
.pf-c-menu--pf-c-menu__item-select-icon--Color
#06c
.pf-c-menu--pf-c-menu__item-select-icon--FontSize
0.625rem
.pf-c-menu--pf-c-menu__item-external-icon--MarginLeft
0.5rem
.pf-c-menu--pf-c-menu__item-external-icon--Color
#06c
.pf-c-menu--pf-c-menu__item-external-icon--FontSize
0.625rem
.pf-c-menu--pf-c-menu__item-external-icon--Opacity
0
.pf-c-menu--pf-c-menu__item-action--PaddingTop
0.5rem
.pf-c-menu--pf-c-menu__item-action--PaddingRight
1rem
.pf-c-menu--pf-c-menu__item-action--PaddingBottom
0.5rem
.pf-c-menu--pf-c-menu__item-action--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__item-action--Color
#6a6e73
.pf-c-menu--pf-c-menu__item-action--hover--Color
#151515
.pf-c-menu--pf-c-menu__item-action--m-favorited--Color
#f0ab00
.pf-c-menu--pf-c-menu__item-action--m-favorited--hover--Color
#c58c00
.pf-c-menu--pf-c-menu__list-item--m-disabled__item-action--Color
#d2d2d2
.pf-c-menu--pf-c-menu__item-action-icon--Height
calc(1rem * 1.5)
.pf-c-menu--pf-c-menu__item-action--m-favorite__icon--FontSize
0.625rem
.pf-c-menu--pf-c-menu__breadcrumb--PaddingTop
1rem
.pf-c-menu--pf-c-menu__breadcrumb--PaddingRight
1rem
.pf-c-menu--pf-c-menu__breadcrumb--PaddingBottom
1rem
.pf-c-menu--pf-c-menu__breadcrumb--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__breadcrumb--c-breadcrumb__item--FontSize
1rem
.pf-c-menu--pf-c-menu__breadcrumb--c-breadcrumb__heading--FontSize
1rem
.pf-c-menu--pf-c-menu--m-drilldown--c-menu--Top
0
.pf-c-menu--pf-c-menu--m-drilldown--c-menu--TransitionDuration--transform
250ms
.pf-c-menu--pf-c-menu--m-drilldown--c-menu--Transition
transform 250ms
.pf-c-menu--pf-c-menu--m-drilldown__content--TransitionDuration--height
250ms
.pf-c-menu--pf-c-menu--m-drilldown__content--TransitionDuration--transform
250ms
.pf-c-menu--pf-c-menu--m-drilldown__content--Transition
transform 250ms, height 250ms
.pf-c-menu--pf-c-menu--m-drilldown__list--TransitionDuration--transform
250ms
.pf-c-menu--pf-c-menu--m-drilldown__list--Transition
transform 250ms
.pf-c-menu--pf-c-menu--m-drilled-in--c-menu__list-item--m-current-path--c-menu--ZIndex
100
.pf-c-menu--pf-c-menu__footer--PaddingTop
1rem
.pf-c-menu--pf-c-menu__footer--PaddingRight
1rem
.pf-c-menu--pf-c-menu__footer--PaddingBottom
1rem
.pf-c-menu--pf-c-menu__footer--PaddingLeft
1rem
.pf-c-menu--pf-c-menu__footer--BoxShadow
0 -0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16)
.pf-c-menu.pf-m-drilldown > .pf-c-menu__content .pf-c-menu--pf-c-menu--BoxShadow
none
.pf-c-menu__breadcrumb .pf-c-breadcrumb--pf-c-breadcrumb__item--FontSize
1rem
.pf-c-menu__breadcrumb .pf-c-breadcrumb--pf-c-breadcrumb__heading--FontSize
1rem
.pf-c-menu__content .pf-c-menu__content--pf-c-menu__content--Height
auto
.pf-c-menu__list-item:hover--pf-c-menu__list-item--BackgroundColor
#f0f0f0
.pf-c-menu__list-item:focus-within--pf-c-menu__list-item--BackgroundColor
#f0f0f0
.pf-c-menu__list-item.pf-m-disabled--pf-c-menu__list-item--hover--BackgroundColor
transparent
.pf-c-menu__list-item.pf-m-disabled--pf-c-menu__list-item--focus-within--BackgroundColor
transparent
.pf-c-menu__list-item.pf-m-disabled--pf-c-menu__item--Color
#6a6e73
.pf-c-menu__list-item.pf-m-disabled--pf-c-menu__item-action--Color
#d2d2d2
.pf-c-menu__list-item.pf-m-disabled--pf-c-menu__item-toggle-icon
#d2d2d2
.pf-c-menu__list-item.pf-m-load--pf-c-menu__list-item--hover--BackgroundColor
transparent
.pf-c-menu__list-item.pf-m-load--pf-c-menu__list-item--focus-within--BackgroundColor
transparent
.pf-c-menu__list-item.pf-m-load--pf-c-menu__item--Color
#06c