Menu Button
Use the Menu component to display a dropdown list of user actions.
Menu Anatomy
LyteNyte Grid exports the Menu component as a general-purpose dropdown list of actions.
The Menu component supports nested lists, grouped items, and checkbox items.
The Menu component is headless and is composed of multiple parts that must be used together.
The code block below shows these parts assembled:
<Menu> <Menu.Trigger />
<Menu.Popover> <Menu.Arrow /> <Menu.Container> <Menu.Title className="sr-only" /> <Menu.Description className="sr-only" />
<Menu.Item /> <Menu.Item />
<Menu.Divider /> <Menu.RadioGroup> <Menu.RadioItem /> <Menu.RadioItem /> <Menu.RadioItem /> </Menu.RadioGroup>
<Menu.Divider /> <Menu.Group> <Menu.Header />
<Menu.CheckboxItem /> <Menu.CheckboxItem /> </Menu.Group>
<Menu.Submenu> <Menu.SubmenuTrigger /> <Menu.SubmenuContainer> <Menu.Item /> <Menu.Item /> </Menu.SubmenuContainer> </Menu.Submenu> </Menu.Container> </Menu.Popover></Menu>Basic Menu
The demo below shows a basic example of the Menu component. It demonstrates three
types of menu items:
Menu.Item: A standard menu item that performs an action when clicked.Menu.RadioItem: An exclusive selection radio item. Must be rendered within aMenu.RadioGroup.Menu.CheckboxItem: An inclusive selection checkbox item that can be used for toggle settings and flags.
Basic Submenu
Use the Menu.Submenu component to group related menu items into an expandable list
of options. The demo below shows a submenu in action.
Menu Properties
All Menu component parts accept standard HTML element properties. The properties list below
describes the additional properties provided by the Menu components.
Menu
Menu extends the popover component with additional logic
for dropdown menus, inheriting its foundational properties.
Prop
Menu.Item
Prop
Menu.CheckboxItem
Prop
Menu.Arrow
Prop
Menu.RadioGroup
Prop
Menu.RadioItem
Prop
Menu.Submenu
Prop
Menu.SubmenuTrigger
Prop
Next Steps
- Popover: Display anchored, on-demand content in an overlay.
- Pill Manager: Create and manage grid interactions using label pills.
- Context Menu: Display a context-aware menu for grid actions.
