Menu
React componentPlace contextual actions in a keyboard-accessible dropdown.
Try it out
Use the live controls or open the Code tab to view and copy the example.
API reference
Generated from the package’s TypeScript exports. Standard React event and ARIA attributes are also accepted where the component wraps a native element.
| Prop | Type | Description |
|---|---|---|
triggerRequired | ReactElement<unknown, string | JSXElementConstructor<any>> | A single focusable React element; use a staqui Button or Link. |
labelRequired | string | A meaningful visible or accessible label. |
itemsRequired | MenuItem[] | Menu actions with stable ids and optional groups. |
align | "start" | "center" | "end" | undefinedDefault: "end" | See the typed definition and working example for this option. |
onOpenChange | ((open: boolean) => void) | undefined | Called when the user opens or dismisses the overlay. |
Accessibility & interaction
Radix provides roving focus, typeahead, disabled items, Escape and focus restoration. Items support groups and links; nested submenus are not exposed.
Visible focus, reduced motion, and both color themes are shared across staqui. Choose labels and document structure that make sense in your application; automated checks do not replace assistive-technology testing.
Variants & implementation notes
Radix provides roving focus, typeahead, disabled items, Escape and focus restoration. Items support groups and links; nested submenus are not exposed.
Use the typed API above for the supported variants. The example demonstrates the primary composition; shared controls inherit hover, focus, active and disabled treatment where applicable.