Variants and sizes

  • Item, with or without an icon: k-menu__item.
  • Item with a shortcut: k-menu__shortcut inside it.
  • Destructive item: k-menu__item--critical, label and icon in critical, after a separator.

States

  • Rest: an ink label on surface.
  • Hover: the item's content colour at 8% (state-hover) over it; pressed: 12% (state-pressed).
  • Focus: the 2px focus-ring, 2px outside the item.
  • Open and closed: the trigger's aria-expanded says which; the closed menu is hidden.
  • Critical: the verb ("Leave project"), its place after the separator and the critical colour say it together.
  • Disabled: none. Leave out an action that can't be taken.

Do and don’t

Do

  • Start every label with a verb that names the outcome: Edit project, Export payments.

  • Put the destructive action last, after a separator, and confirm it in a Dialog.

Don’t

  • Nest menus, and don't put more than seven items in one.

  • Open a second menu or a snackbar over an open menu.

  • Use accent in a menu.

What you provide

  • The trigger's name.
  • The items, in groups: label, optional icon name, optional shortcut, whether it is destructive, and the action.