OverflowMenu

OverflowMenus contain a list of actions in a menu, that is hidden until the user clicks on the OverflowMenu button. Used throughout Arc XP, the OverflowMenu keeps key actions close by in a clean and unobtrusive menu.

OverflowMenu

Features

Hides non-critical actions out of the user's view.
Handles overflows of menus where all items cannot be displayed.

#Import

Arc UI exports 2 components for an OverflowMenu:
  • OverflowMenu: The wrapper component that provides
  • MenuOption: Trigger that handles selection. Must be a child of OverflowMenu.
import { OverflowMenu, MenuOption } from '@wpmedia/ads-menu'
interface OverflowMenuProps
PropsDescription
children
ReactElement<MenuOptionProps>[]

Menu items must use the MenuOption component to wrap content.

label
string

Label for the tooltip on the icon button. See Tooltip label

onAction
(optional)
any

Handler that is called when an item is selectd.

placement
(optional)
any

Dictates where the menu options will populate.


#Usage


#Component structure

'OverflowMenu's component structure'
  1. OverflowMenu button: The button that triggers the OverflowMenu.
  2. OverflowMenu: The menu itself, containing a list of menu items.

#Usage

#Disabled menu item

For menu items that are currently disabled, use Gray-300 to create less contrast, helping the user understand the menu item is currently disabled/unavailable.

#Destructive menu item highlight

OverflowMenus sometimes contain menu items that are destructive in nature. Use the danger color on hover to communicate to the user that the action is critical and will result in a destructive effect. This is best paired with a confirmation dialog.

#Accessibility considerations

Copyright 2021 Arc XP