Action menu
Action menu is composed of action list and overlay patterns used for quick actions and selections.
On this page
Work in progressWe are currently transferring the React documentation for ActionMenu from a different site to this page. To view the original documentation with code examples, please visit the Primer React documentation for ActionMenu.
On this page
Import
import {ActionMenu} from '@primer/react'
Examples
Props
ActionMenu
| Name | Default | Description |
|---|---|---|
childrenRequired | React.ReactElement[]Recommended: | |
open | false | booleanIf defined, will control the open/closed state of the overlay. Must be used in conjuction with |
onOpenChange | (open: boolean) => voidIf defined, will control the open/closed state of the overlay. Must be used in conjuction with | |
anchorRef | React.RefObject<HTMLElement>Useful for defining an external anchor |
ActionMenu.Button
| Name | Default | Description |
|---|---|---|
childrenRequired | React.ReactElement |
ActionMenu.Anchor
| Name | Default | Description |
|---|---|---|
childrenRequired | React.ReactElementAccepts a single child element |
ActionMenu.Overlay
| Name | Default | Description |
|---|---|---|
childrenRequired | React.ReactNode | |
align | start | start | center | end |