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
keystringThe unique key for the item.
labelReact.ReactNodeThe label of the item.
testId?stringThe test id for the item.
onItemClick()?() => voidIf set, this function will be called when the user clicks this 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.
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.
style?CSSPropertiesThe style for the item.
isActive?booleanSets the data-active attribute to true and applies styling