Skip to main contentCarbon Design System

Menu

Color

Default state

Refer to the button for primary and secondary button styling in the transactional modal.

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

Menu items have six interactive states – hover, focus, focus and hover, danger hover, danger hover and focus, and disabled.

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
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
Main menu structure

Structure and spacing measurements for main menu

Submenu structure

Structure and spacing measurements for submenu

Default menu option item structure
Selected menu option item structure

Structure and spacing measurements for individual menu option items

Sizes

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 (x-sm)24 / 1.5
Small (sm)32 / 2
Medium (md)40 /2 .5
Large (lg)48 / 3
Modal sizes