Menu

A sleek, interactive component that reveals options on click, perfect for seamless navigation and organizing choices in a compact space.

Basic

A menu presents a variety of actions or options from which you can choose.

Installation

In the terminal, run the following command to begin:
npx hq-kit add menu

Menu can be nested to display submenus.

When respectScreen is set to true (which is default), the menu renders in a modal, but it only supports one submenu. If you try to open a second submenu, the modal will close, so use this feature with caution.

Respect Screen

By default, the menu will respect the screen size, when it lower than 600px, it will be displayed as a modal slide from the bottom. You can disable this behavior by setting respectScreen to false.

Danger

Designate a menu item as dangerous.

With Icon

Enhance menu items by adding icons.

Dynamic Menu

Generate menu items dynamically.

Multiple Menu

Display a selection of actions or options.

Single Menu

Present a single list of options.

Section Menu

Organize menu items into grouped sections.

Arrow

Incorporate an arrow into the menu using the showArrow prop on Menu.Content.

Item Details

You can add details to menu items by using the Menu.ItemDetails component.

Disabled

Disable specific menu items.

Also, you can disable items directly in Menu.Content by using the disabledKeys prop.

<Menu.Content disabledKeys={['gsu']} />

Open Modal

Trigger a modal from a menu item. Refer to the modal demo for further information.