Skip to main content

AriaMenuItem

type AriaMenuItem = Omit<ItemProps<typeof Item>, "children"> & object;

The structure of a menu item that can be used to create a dropdown menu.

Type declaration

NameTypeDescription
alternativeHoverClassName?stringClass name that is used to override the default hover style.
alternativeHoverStyle?CSSPropertiesStyle that is used to override the default hover style.
className?stringThe class name for the item.
closeMenuOnItemClick?booleanIf set to false, the menu will not close when the user clicks this item.
icon?React.ReactNodeThe icon to display next to the item.
isActive?booleanSets the data-active attribute to true and applies styling
keystringThe unique key for the item.
labelReact.ReactNodeThe label of the item.
onItemClick()?() => voidIf set, this function will be called when the user clicks this item.
style?CSSPropertiesThe style for the item.
testId?stringThe test id for the item.