Skip to content

Menu

Dropdown menus are used to display a list of quick actions in a floating surface.

  • Restyled using StrataKit’s visual language.
  • Removed role="dialog" semantics from the paper slot.
  • Added fallback mechanism for automatically labelling the list slot using the trigger element (anchorEl).
  • Includes full forced-colors support.
  • disableScrollLock is used to prevent scroll locking when the menu is open.
  • The default container now resolves from StrataKit’s portal context, which defaults to root portal container.
  • The autoFocus and disableAutoFocusItem props are not supported.
  • The action, dense, and focusVisibleClassname props of MenuItem are not supported.
  • Ripple effect removed. The centerRipple, disableRipple, disableTouchRipple, focusRipple, TouchRippleProps, and touchRippleRef props of MenutItem are not supported.

Pass the dense prop through slotProps.list to make the Menu smaller. This is useful when space is limited, or when the Menu is triggered by a small button.

The dense prop is also available via MenuList.

To make MenuItems selectable, override the default role to either:

With the appropriate role in place, use aria-checked="true" and the selected prop to mark the selected item(s).