Menu
Interactive menu with items made easy
Quick nav
Features
- Keyboard accessible
- Reusable
- Checkable items
- Themes ready
Anatomy
import { Menu } from "@wonderflow/react-components";
export default () => {
return (
<Menu>
<Menu.Item>Item</Menu.Item>
<Menu.ItemCheckbox>Checkable item</Menu.ItemCheckbox>
<Menu.Item>Item</Menu.Item>
</Menu>
);
};API Reference
Menu
Property
Type
Default
maxHeightstringMenu.Item
Property
Type
Default
iconenumvalue*stringiconPositionenumleftdimensionenumregularonClickfunctiondescriptionReactNodedisabledbooleanfalsepaddingbooleantrueautoFocusbooleandecorationReactNodeasenumbuttonMenu.ItemCheckbox
The Menu.ItemCheckbox extends all the Menu.Item properties and adds the following ones:
Property
Type
Default
checkedbooleanAccessibility
Keyboard interactions
tab
Move focus on the next focusable element inside the menu.
enter
Trigger the menu item action.
ArrowUp
Move the focus on the previous menu item
ArrowDown
Move the focus on the next menu item