Skip to main contentCarbon Design System

Menu

The following page documents visual specifications such as color, typography, structure, and size.

Color

ElementsPropertyColor token
Menu optionbackground-color$layer *
text-color$text-secondary
border-top$border-subtle *
Caret iconsvg$icon-secondary
Shortcut iconsvg$icon-secondary
Containerbox-shadow0 2px 6px 0 rgba(0,0,0,.2)

* Denotes a contextual color token that will change values based on the layer it is placed on.

Menu default state

Interactive state color

StateElementPropertyColor token
HoverMenu optionbackground-color$layer-hover *
Menu optiontext-color$text-primary
Iconsvg$icon-primary
FocusMenu optionbackground-color$layer*
Menu optionborder$focus
Focus and hoverMenu optionbackground-color$layer-hover *
Menu optiontext-color$text-primary
Iconsvg$icon-primary
Menu optionborder$focus
Danger hoverMenu optionbackground-color$support-error
Menu optiontext-color$text-on-color
Iconsvg$icon-on-color
Danger hover and focusMenu optionbackground-color$support-error
Menu optiontext-color$text-on-color
Menu optionborder$focus
Iconsvg$icon-on-color
DisabledMenu optionbackground-color$layer *
Menu optiontext-color$text-disabled
Iconsvg$icon-disabled

* Denotes a contextual color token that will change values based on the layer it is placed on.

Menu interactive states

Typography

ElementFont-size (px/rem)Font-weightType token
Menu option text14 / 0.875Regular / 400$body-compact-01

Structure

ElementPropertypx / remSpacing token
Iconicon size16 / 1
Option (default)padding-right, padding-left16 / 1$spacing-05
Option (selectable but unselected)padding-right, padding-left16 / 1, 40 / 2.5$spacing-05, $spacing-08
Option (selectable and selected)padding-right, padding-left16 / 1$spacing-05
Option (next to the divider)margin-top, or margin-bottom4 / .25$spacing-02
Option (first and last)margin-top, or margin-bottom4 / .25$spacing-02
Dividermargin-top1px

Default menu structure

Default menu structure

Structure and spacing measurements for main menu

Submenu structure

Structure and spacing measurements for submenu

Default menu option structure
Selected menu option structure

Structure and spacing measurements for individual menu options

Size

There are four menu option sizes: extra small, small, medium, and large. The height of a menu is determined by a menu button. Menus have a fixed minimum width of 160px (or 10rem), to ensure menu items have sufficient horizontal space, while also having a fixed maximum width of 288px (or 18rem).

ElementsSizeHeight (px/rem)
Menu optionExtra small (xs)24 / 1.5
Small (sm)32 / 2
Medium (md)40 / 2 .5
Large (lg)48 / 3
Menu sizes

Feedback

Help us improve this component by providing feedback, asking questions, and leaving any other comments on GitHub.