Skip to content

Menu

const Menu: React.FC<MenuProps>

Defined in: src/components/navigation/Menu/Menu.tsx:53

A configuration-driven menu component for editor interfaces.

Automatically handles radio/checkbox selection states, grouping, and nested submenus based on provided configuration object.

Example

const config = {
groups: [{
id: 'actions',
items: [
{
id: 'copy',
label: 'Copy',
onClick: handleCopy,
subMenu: nestedConfig,
submenuTrigger: 'hover' // Opens on hover (default)
},
{
id: 'paste',
label: 'Paste',
onClick: handlePaste,
subMenu: nestedConfig,
submenuTrigger: 'click' // Opens on click only
}
],
itemSelectionType: 'none'
}]
};
<Menu config={config}>
<Button>Options</Button>
</Menu>