Menu
What is this?β
Menu triggers allow merchants to open a dropdown and start contextual actions that are rarely used or repeated for each item in a list.
Compositionβ
Name | Description |
---|---|
MenuButton | Button that triggers the menu popover |
Menu | Menu's popover |
MenuItem | Represents a button rendered inside the MenuList |
MenuDivider | Represents an hr used to separate the menu popover into sections |
Variantsβ
MenuButton has four possible variants: primary
, secondary
, tertiary
and neutralTertiary
. Primary is the default variant.
Sizesβ
MenuButton has two possible sizes: normal
and large
. Normal is the default size.
Icon onlyβ
You can use the labelHidden
property to hide the MenuButton label
Customβ
It possible to use the label
MenuButton property to set the button text. When a custom label is used, the icon changes to the IconCaretDown/Up.
Disabledβ
Disable the MenuButton by setting the disabled
property to true.
Bleedβ
MenuButton can trespass the parent padding for some alignment and layout reasons, it is possible to achieve this behavior through the bleedX
and bleedY
property.
Itemβ
MenuItem has two possible variants: neutral and critical, to enable the critical variant, the critical
property needs to be true.
Item clickβ
It is possible to set a custom action when a item is clicked.
Item disabledβ
Disable the MenuItem by setting the disabled
property to true.