Action menu

Action menu is composed of action list and overlay patterns used for quick actions and selections.

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.
  • @primer/react@35.25.1
  • Beta
  • Reviewed for accessibility

Import

import {ActionMenu} from '@primer/react'

Examples

View in Storybook

Props

ActionMenu

NameDefaultDescription
childrenRequired
React.ReactElement[]

Recommended: ActionMenu.Button or ActionMenu.Anchor with ActionMenu.Overlay

open
falseboolean

If defined, will control the open/closed state of the overlay. Must be used in conjuction with onOpenChange.

onOpenChange
(open: boolean) => void

If defined, will control the open/closed state of the overlay. Must be used in conjuction with open.

anchorRef
React.RefObject<HTMLElement>

Useful for defining an external anchor

ActionMenu.Button

NameDefaultDescription
childrenRequired
React.ReactElement

ActionMenu.Anchor

NameDefaultDescription
childrenRequired
React.ReactElement

Accepts a single child element

ActionMenu.Overlay

NameDefaultDescription
childrenRequired
React.ReactNode
align
startstart | center | end