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

Menu Button

Use the Menu component to display a dropdown list of user actions.

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.

Basic Menu Implementation

Fork code on stack blitzFork code on code sandbox

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.

Basic Submenu

Fork code on stack blitzFork code on code sandbox

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

Menu extends the popover component with additional logic for dropdown menus, inheriting its foundational properties.

Prop

Prop

Prop

Prop

Prop

Prop

Prop

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.