ZBMui

Menu

View markdown

A list of actions in a dropdown, enhanced with keyboard navigation.

Installation

components/ui/menu.tsx

Usage

Examples

Open on hover

Enable opening the menu when hovering over the trigger by setting the openOnHover prop on MenuTrigger.

With Checkbox

With Radio group

Switch variant & indicator position

Menu checkbox items support a switch variant and an indicatorPosition prop to position the indicator at the start or end of the item. Default indicatorPosition is end.

Menu radio items support an indicatorPosition prop to position the indicator at the start or end of the item. Default indicatorPosition is end.

To change the side and alignment of the menu popup, use the positionerProps prop of MenuPopup and pass the desired side and align values.

Side

Align

By default, menu items close the menu when clicked because for MenuItem the default value of the closeOnClick prop is true.

But for MenuCheckboxItem and MenuRadioItem, the default value of the closeOnClick prop is false. You can change this behavior by setting the closeOnClick prop to true.

API Reference

Component type props
Prop
Type
Default
Expand prop details

Component type props
Prop
Type
Default
Expand prop details

Component type props
Prop
Type
Default
Expand prop details

Component type props
Prop
Type
Default
Expand prop details

ZBMui

Built by the ZBM.

© 2026 ZBM ui. All rights reserved.