MenuButton

core package3.2.2

Note: All components shown on this site are supported by the Constellation design system. To learn how to configure Theme Cosmos, visit Pega Community.

The MenuButton component is a Button that will open up a Menu.

To learn more about configuration, visit Pega Community.

Usage

Each MenuButton expects text that will render within a Button. This component accepts the same visual variants as the Button component, and also supports iconOnly rendering. An Icon can be displayed alongside the Button text, or on its own if iconOnly is true. If the MenuButton is only rendering an Icon, the text prop will be applied to the content of a Tooltip that will render upon hover or focus of the MenuButton for accessibility purposes. The MenuButton may also display an optional count alongside any text.

When a MenuButton is clicked, a Menu will be rendered within a Popover, and an optional onClick callback function will be triggered. The rendering of the Menu and its items will depend on the props passed to the MenuButton's menu prop.

Below are three demos that showcase suggested usage of the MenuButton component when used with each of the Menu component's three modes: action, single-select, and multi-select.

Related components

Properties