ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
API
<ActionMenu>
<MenuItem />
</ActionMenu>
ActionMenu
| Name | Type | Default |
|---|---|---|
menuSize | 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the Menu. | ||
isDisabled | boolean | Default: — |
Whether the button is disabled. | ||
size | 'XS'
| 'S'
| 'M'
| 'L'
| 'XL' | Default: 'M'
|
The size of the ActionButton. | ||
isQuiet | boolean | Default: — |
Whether the button should be displayed with a quiet style. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||
children | ReactNode | | Default: — |
The contents of the collection. | ||
items | Iterable | Default: — |
Item objects in the collection. | ||
disabledKeys | Iterable | Default: — |
The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | ||
isOpen | boolean | Default: — |
Whether the overlay is open by default (controlled). | ||
defaultOpen | boolean | Default: — |
Whether the overlay is open by default (uncontrolled). | ||
onOpenChange | | Default: — |
Handler that is called when the overlay's open state changes. | ||
shouldCloseOnSelect | boolean | Default: — |
Whether the menu should close when the menu item is selected. | ||
direction | 'bottom'
| 'top'
| 'left'
| 'right'
| 'start'
| 'end' | Default: 'bottom'
|
Where the Menu opens relative to its trigger. | ||
align | 'start' | 'end' | Default: 'start'
|
Alignment of the menu relative to the trigger. | ||
shouldFlip | boolean | Default: true
|
Whether the menu should automatically flip direction when space is limited. | ||
onAction | | Default: — |
Handler that is called when an item is selected. | ||
autoFocus | boolean | Default: — |
Whether the element should receive focus on render. | ||
id | string | Default: — |
The element's unique identifier. See MDN. | ||
aria-label | string | Default: — |
Defines a string value that labels the current element. | ||
aria-labelledby | string | Default: — |
Identifies the element (or elements) that labels the current element. | ||
aria-describedby | string | Default: — |
Identifies the element (or elements) that describes the object. | ||
aria-details | string | Default: — |
Identifies the element (or elements) that provide a detailed, extended description for the object. | ||
UNSAFE_className | UnsafeClassName | Default: — |
Sets the CSS className
for the element. Only use as a last resort. Use the | ||
UNSAFE_style | CSSProperties | Default: — |
Sets inline style for the
element. Only use as a last resort. Use the | ||