Skip to main content

MenuItem

MenuItem | Element to display items in the Menu item shadow

MenuItem is a child of the Menu. element and represents a navigation item within it. It can display a submenu with additional navigation items and also allows icons to be displayed.

Basic Usage

For examples of using MenuItem, go to the documentation page for the Menu. element.

Attributes and Properties

checked

DescriptionIf true, a check icon appears in the MenuItem.
Attributechecked
Typeboolean
Defaultfalse

collapse

DescriptionIf true, the submenu is in the collapsed state.
Attributecollapse
Typeboolean
Defaultfalse

placement

DescriptionSpecifies the location of the submenu on the screen.
Attributeplacement
Type"bottom" | "bottom-end" | "bottom-start" | "left-bottom" | "left" | "left-top" | "right-bottom" | "right" | "right-top" | "top" | "top-end" | "top-start" | string & Record<never, never> | undefined
Defaultright-start

Option

DescriptionSpecifies the submenu variant. Possible values include context, which displays the submenu in a context window, or nav, which displays the submenu as a drop-down menu.
AttributeOption
Typestring
Defaultcontext

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeRefers to a div element inside an element.
submenurefers to the slot element inside the element.

CSS Custom Properties

NameDescription
--wj-menu-backgroundBackground colour of the element
--wj-menu-border-colorColour of element edges
--wj-menu-border-radiusRounding of the edges of the element
--wj-menu-border-styleRounding style of the element
--wj-menu-border-widthWidth of the edges of the element
--wj-menu-padding-bottomLower internal offset of the element
--wj-menu-padding-inlineInternal offset of the element left and right
--wj-menu-padding-topUpper internal offset of the element
--wj-menu-from-indexZ-index of the element

Slots

No slots available for this component.