Mega menu
Mega menu
<button class="c-button mega-menu-trigger c-button__filled c-button__filled--primary c-button--md" target="_top" data-js-toggle-trigger="mega-menu" type="button" aria-label="Open hamburger menu" id="mega-menu-trigger-open" data-uid="68b86bd5ada73">
<span class="c-button__label"> <span class="c-button__loader"></span>
<span class="c-button__label-text ">
Open hamburger menu
</span>
</span> </button>
<!-- megaMenu.blade.php -->
<div class="c-megamenu u-display--none u-display--none@xs u-display--none@sm u-display--none@md u-display--none" data-uid="68b86bd5adaea">
<nav class="c-megamenu__menu o-container o-container--wide o-grid">
<ul class="c-megamenu__list o-grid unlist o-grid-12">
<li id="-main-item-1"
class="c-megamenu__item c-megamenu__item--parent o-grid-12 o-grid-6@md o-grid-4@lg o-grid-3@xl u-mb-6 u-margin__top--1 c-megamenu__item--has-children">
<div class="c-link c-megamenu__link c-megamenu__link--title" id="" data-uid="68b86bd5adb46">
Styleguide
</div>
<ul class="c-megamenu__sublist c-megamenu__sublist--list unlist u-margin__top--2">
<li id="-item-2" class="c-megamenu__item c-megamenu__item--child ">
<div class="c-link c-megamenu__link c-megamenu__link--child" id="" data-uid="68b86bd5adb81">
Styleguide child
</div>
</li>
</ul>
</li>
</ul>
</nav>
</div>
@button([
'id' => 'mega-menu-trigger-open',
'color' => 'primary',
'text' => 'Open hamburger menu',
'classList' => [
'mega-menu-trigger',
],
'attributeList' => [
'data-js-toggle-trigger' => 'mega-menu',
]
])
@endbutton
@megaMenu([
'menuItems' => [
[
'id' => 1,
'label' => 'Styleguide',
'children' => [
[
'id' => 2,
'label' => 'Styleguide child',
'href' => '',
'classNames' => ''
]
],
'href' => '',
'classNames' => ''
]
],
])
@endmegaMenu
Blade component parameters
Key | Default value | Type | Available values | Description |
menuItems | [] | array | - | List of arrays containing at least 'label' and 'href' option 'icon' name as string. |
parentType | default | string | - | Select the type of menu parents. |
parentStyle | false | boolean | - | Select the style of menu parents (only applies when type equals button). |
parentStyleColor | primary | string | - | Select the color of the parent style. (only applies when type equals button). |
childType | default | string | - | Select the type of menu children. |
childStyle | false | boolean | - | Select the style of menu children. (only applies when type equals button). |
childStyleColor | primary | string | - | Select the color of the child style. (only applies when type equals button). |
mobile | false | boolean | - | If true, the mega menu will be visible on mobile as well. |
id | string | - | The DOM id of the component. | |
classList | [] | array | - | Array containing wrapping classes array |
attributeList | [] | array | - | Array containing keys and values rendered as attributes |
containerAware | false | boolean | true/false | Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component. |