Skip to main content

Menu

shadow

The menu element is used to display the navigation. It is hidden by default and is displayed by adding the active attribute, for example, when a button is clicked. Špeciálne pre použitie v Menu sú navrhnuté elementy MenuItem a MenuLabel.

Basic usage

Inset

Variant: Megamenu

Variant: Nav

Collapse

The collapse attribute displays the menu in collapsed state. In this state, the menu is collapsed and only the icon is displayed.

Atribúty a Vlastnosti

active

DescriptionControls whether the menu is currently active.
Attributeactive
Typeany
Default-

collapse

DescriptionControls whether the menu is rendered in collapsed mode.
Attributecollapse
Typeany
Default-

Eventy

No events available for this component.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeThe native part of the menu.

CSS Custom Vlastnosti

NameDescription
--wje-menu-backgroundDefines the background color of the menu. Accepts any valid CSS color value, such as #ffffff, rgb(255, 255, 255), or CSS variables.
--wje-menu-border-widthSpecifies the width of the menu's border. Accepts any valid CSS length value (e.g., px, em, %).
--wje-menu-border-styleSets the style of the menu's border. Common values include solid, dashed, dotted, etc.
--wje-menu-border-colorDefines the color of the menu's border. Accepts any valid CSS color value.
--wje-menu-border-radiusDetermines the radius of the menu's corners, creating rounded edges. Accepts any valid CSS length value (e.g., px, %).
--wje-menu-padding-topSpecifies the top padding inside the menu. Accepts any valid CSS length value.
--wje-menu-padding-bottomSpecifies the bottom padding inside the menu. Accepts any valid CSS length value.
--wje-menu-padding-inlineSets the horizontal (left and right) padding inside the menu. Accepts any valid CSS length value.
--wje-menu-margin-topDefines the top margin outside the menu. Accepts any valid CSS length value.
--wje-menu-margin-bottomDefines the bottom margin outside the menu. Accepts any valid CSS length value.
--wje-menu-margin-inlineSpecifies the horizontal (left and right) margin outside the menu. Accepts any valid CSS length value.
--wje-menu-collapse-widthSets the width of the menu when it is collapsed. This property is typically used to define the reduced size of the menu in collapsed state. Accepts any valid CSS length value.

Sloty

NameDescription
defaultThe default slot for the menu.