LyteNyte Grid logo for light mode. Links back to the documentation home page.
Components

Menu Button

A menu button displays a list of actions when the user presses the button.

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 a Menu.RadioGroup.
  • Menu.CheckboxItem: An inclusive selection checkbox item that can be used for toggle settings and flags.

Menu

Fork code on stack blitzFork code on code sandbox

Use the Menu.Submenu component to group related menu items into an expandable list of options. The demo below shows a submenu in action.

Submenu

Fork code on stack blitzFork code on code sandbox

Properties

All Menu component parts accept standard HTML element properties. The properties list below describes the additional properties provided by the Menu components.

The Menu component is a popover component with additional logic for handling dropdown menus. Its properties reflect this.

Prop

Prop

Prop

Prop

Prop

Prop

Prop

Prop

Next Steps

  • Popover: Display additional content in a popover.
  • Pill Manager: Create and manage grid interactions using label pills.
  • Context Menu: Display a menu for actions in the grid with contextual information.