Menu Element
The Menu Element displays a WordPress menu anywhere you build with the Builder. It is the main navigation of a header section, but it works just as well for a footer menu, a vertical sidebar navigation or a small list of links in a column.
You control the direction, spacing, hover transitions, submenus and the mobile version in one place. Submenus open as classic dropdowns, as a full-screen flyout or, in vertical menus, stacked below their parent item. On smaller screens the menu can collapse into a button with its own icons and colors.
In this article: How To Use · Element Options · Tips · Related Elements · Example
How To Use The Menu Element
Build the menu itself under Appearance > Menus. Then add the Menu Element to a column, pick it in the Menu field and choose the Direction: Horizontal for a header bar, Vertical for a sidebar. On the General tab you also set Menu Arrows, the Transition Time, the Space Between Main Menu and Submenu and an ARIA Label Attribute.
The Main tab styles the top-level items: Minimum Height, Align Items, Justification, Main Menu Typography, padding, spacing, colors, borders and the Main Menu Hover Transition. The Submenu tab sets the Submenu Mode, the Expand Method (hover or click), direction and transition, width, typography, colors and an optional box shadow.
The Mobile tab decides when and how the menu collapses. Collapse to Mobile Breakpoint picks the screen size (or Custom for a pixel value, or Never). Mobile Menu Mode shows the menu collapsed behind a button or always expanded, and Mobile Menu Expand Mode sets whether the open menu spans the full width or stays inside its column. The trigger button gets its own text, icons, colors and alignment.
Element Options
The tables below list every option of the element, grouped by the tabs you see when you edit it in the Builder. Many options depend on others, so the edit screen only shows the options that apply to your current choices.
Options with a small state switch next to them can be set separately for the normal, hover and active state.
General
| Heading | Description |
|---|---|
| Menu | Select the menu which you want to use. |
| Element Visibility | Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time. |
| Element Sticky Visibility | Choose to show or hide the element, based on the current mode (normal or sticky) of its parent container. You can choose more than one at a time. |
| Direction | Choose to have a horizontal or a vertical menu. |
| Margin | Spacing above and below the section. Enter values including any valid CSS unit, for example 4%. |
| Transition Time | Set the time for submenu expansion and all other hover transitions. In milliseconds. |
| Space Between Main Menu and Submenu | Controls the space between the main menu and dropdowns. |
| Menu Arrows | Choose if you want to show dropdown arrows on the main menu and submenus. |
| Arrow Size | Controls the width and height of the arrows. |
| ARIA Label Attribute | Set an aria-label attribute for the menu. If left empty, the menu name as set in the menu options will be used. |
| CSS Class | Add a class to the wrapping HTML element. |
| CSS ID | Add an ID to the wrapping HTML element. |
Main
| Heading | Description |
|---|---|
| Minimum Height | The minimum height for the main menu. Use any valid CSS unit. |
| Sticky Minimum Height | The minimum height for main menu links when the container is sticky. Use any valid CSS unit. |
| Align Items | Select how main menu items will be aligned. Defines the default behavior for how flex items are laid out along the cross axis on the current line (perpendicular to the main-axis). |
| Justification | Select how main menu items will be justified. |
| Main Menu Typography | Controls the typography of the main menu item. Leave empty for the global font family. |
| Main Menu Item Text Align | Select if main menu items should be aligned to the left, right or centered. |
| Main Menu Item Padding | Select the padding for main menu items. Enter values including any valid CSS unit, for example 10px or 10%. |
| Main Menu Item Spacing | The gap between main menu items. Use any valid CSS value, including its unit (10px, 4%, 1em etc). |
| Main Menu Item Border Radius | Enter values including any valid CSS unit, for example 10px. |
| Main Menu Hover Transition | Select the animation type when hovering the main menu items. This animation is applied to the background-color and borders. |
| Main Menu Icon Position | Controls the main menu icon position. |
| Main Menu Icon Size | Controls the size of the main menu icons. |
| Main Menu Item Background Color | Controls the background-color for main menu items. |
| Main Menu Item Text Color | Controls the color for main menu item text color. |
| Main Menu Item Border Size | Select the border size for main menu items. Enter values including any valid CSS unit, for example 10px. |
| Main Menu Item Border Color | Controls the border-color for main menu items. |
| Main Menu Item Icon Color | Controls the main menu icon color. |
Submenu
| Heading | Description |
|---|---|
| Dropdown Carets | Select whether dropdown carets should show as submenu indicator. |
| Submenu Mode | Select whether you want a classic dropdown, or a full-screen flyout. |
| Expand Method | Select how submenus will expand. If carets are enabled, then they will become clickable. |
| Close On Outer Click | Select if submenu should be closed on click outside the section. |
| Click Method Mode | Select how the submenus should open. Toggle allows several items to be open at a time. Accordion only allows one item to be open at a time. |
| Submenu Indent | Set submenu indent. Enter values including any valid CSS unit, for example 10px or 10%. |
| Submenu Expand Direction | Changes the expand direction for submenus and vertical menus. |
| Submenu Expand Transition | Changes the expand transition for submenus. |
| Submenu Maximum Width | The maximum width for submenus. Use any valid CSS value. |
| Flyout Direction | Controls the direction the flyout submenu starts from. |
| Submenu Typography | Controls the typography of the submenu items. Leave empty for the global font family. |
| Submenu Item Text Align | Select how the submenu text should be aligned. |
| Submenu Item Padding | Select the padding for submenu items. Enter values including any valid CSS unit, for example 10px or 10%. |
| Submenu Border Radius | Enter values including any valid CSS unit, for example 10px. |
| Box Shadow | Set to “Yes” to enable box shadows. |
| Box Shadow Position | Set the vertical and horizontal position of the box shadow. Positive values put the shadow below and right of the box, negative values put it above and left of the box. In pixels, ex. 5px. |
| Box Shadow Blur Radius | Set the blur radius of the box shadow. In pixels. |
| Box Shadow Spread Radius | Set the spread radius of the box shadow. A positive value increases the size of the shadow, a negative value decreases the size of the shadow. In pixels. |
| Box Shadow Color | Controls the color of the box shadow. |
| Box Shadow Style | Set the style of the box shadow to either be an outer or inner shadow. |
| Submenu Thumbnail Size | Controls the width and height of the submenu image thumbnails. Use “auto” for automatic resizing if you added either width or height. |
| Legacy Mega Menu Title Justification | Select how legacy mega menu titles will be justified. |
| Submenu Separator Color | Controls the color for the submenu items separator. Set to transparent for no separator. |
| Submenu Background Color | Controls the background-color for submenu dropdowns. |
| Submenu Text Color | Controls the text color for submenu dropdowns. |
| Close Icon Color | Controls the close icon color for flyout submenu. |
Mobile
| Heading | Description |
|---|---|
| Collapse to Mobile Breakpoint | The breakpoint at which your navigation will collapse to mobile mode. |
| Mobile Menu Mode | Choose if you want the mobile menu to be collapsed to a button, or always expanded. |
| Mobile Menu Expand Mode | Change the width and position of expanded mobile menus. |
| Mobile Menu Opening Mode | Select how the submenus should open. Toggle allows several items to be open at a time. Accordion only allows one item to be open at a time. |
| Mobile Menu Trigger Padding | Select the padding for your mobile menu’s expand / collapse button. Enter values including any valid CSS unit, for example 10px. |
| Mobile Menu Trigger Background Color | Controls the background-color for the mobile menu trigger. |
| Mobile Menu Trigger Text Color | Controls the text-color for the mobile menu trigger. |
| Mobile Menu Trigger Text | The text shown next to the mobile menu trigger icon. |
| Mobile Menu Trigger Expand Icon | Select icon for expanding / opening the menu. |
| Mobile Menu Trigger Collapse Icon | Select icon for collapsing / closing the menu. |
| Mobile Menu Trigger Font Size | Controls the size of the mobile menu trigger. Font-Size In pixels. |
| Mobile Menu Trigger Horizontal Align | Change the horizontal alignment of the collapse / expand button within its container column. |
| Mobile Menu Trigger Button Full Width | Turn on to make the mobile menu trigger button span full-width. |
| Mobile Menu Trigger Bottom Margin | Controls the space between the mobile menu trigger and expanded mobile menu. |
| Mobile Menu Item Minimum Height | Controls the height of each menu item. In pixels. |
| Mobile Menu Sticky Maximum Height | The maximum height for mobile main menu links when the container is sticky. Use any valid CSS unit. |
| Mobile Menu Text Align | Select if mobile menu items should be aligned to the left, right or centered. |
| Mobile Menu Indent Submenus | Turn on to enable identation for submenus. |
| Mobile Menu Typography | Controls the typography of the mobile menu. Leave empty for the global font family. |
| Mobile Menu Separator Color | Controls the color for mobile menu separators. |
| Mobile Menu Background Color | Controls the background color for mobile menus. |
| Mobile Menu Text Color | Controls the text color for mobile menus. |
Extras
| Heading | Description |
|---|---|
| Conditional Rendering | Add conditional rendering logic for the element. The element will only be part of the post / page contents, if the set conditions are met. NOTE: Server cache can interfere with results. |
| Animation Type | Select the type of animation to use on the element. |
| Direction of Animation | Select the incoming direction for the animation. |
| Animation Color | Select the color of the animation. |
| Speed of Animation | Type in speed of animation in seconds (0.1 – 5). |
| Animation Delay | Select the delay time after the animation starts(0 – 5). |
| Offset of Animation | Controls when the animation should start. |
Tips
- Stacked submenus are only offered when Direction is Vertical. Stacked menus have their own Expand Method, including Always open.
- The Flyout submenu mode always opens on click and does not use the submenu box shadow.
- If a page has more than one menu, give each one a clear ARIA Label Attribute such as
MainorFooter, so screen reader users can tell them apart. - In a sticky header, Element Sticky Visibility, Sticky Minimum Height and Mobile Menu Sticky Maximum Height let the menu change once the container becomes sticky.
- Menu items that link to an anchor on the same page (
#name) scroll smoothly to it. With a Static mobile expand mode, the open mobile menu closes after the click. - Edit the menu items under Appearance > Menus; every Menu Element that uses that menu updates at once.
