Megamenu | jaspr_daisyui_components
jaspr_daisyui_components
pub.dev ↗

Megamenu

A megamenu is a large, horizontal menu where each item opens a popover to show a large block of navigation links. Megamenu must be used once, on top of the page. Inside each popover, you can use a daisyUI menu, or any custom content. Megamenu fits better on large screens only, and for small screens, you can hide the megamenu and show the content in a dropdown or a drawer.

Class name Type Description
megamenu Component For the container div
megamenu-active Part Indicator
megamenu-wide Modifier megamenu dropdown will be as wide as the megamenu container
megamenu-full Modifier megamenu dropdown will fill the entire width of the page
megamenu-vertical Direction Hides horizontal megamenu so we can open a vertical megamenu in small screens
megamenu-xs Size Extra small size
megamenu-sm Size Small size
megamenu-md Size Medium size
megamenu-lg Size Large size
megamenu-xl Size Extra large size

Structure#

Megamenu is a big menu with a lot of items but it must be responsive and work on all screen sizes. On small screens the whole megamenu must be hidden by default and it must be vertical when visible. A button opens the megamenu and max-sm:megamenu-vertical class name to make the megamenu vertical on small screens.
On larger screens, we hide the button and show the megamenu as a horizontal menu, and each button inside the megamenu will open its corresponding popover.

<button class="btn sm:hidden" popovertarget="my-megamenu">Menu</button> // Opens the megamenu on small screens
<div class="megamenu max-sm:megamenu-vertical" id="my-megamenu" popover>
  ├── <span class="megamenu-active"></span> // the visual indicator that moves to the active item
  │
  ├── <button popovertarget="first">1</button> // Opens the first popover. all IDs must be unique and match the popovertarget value
  ├── <div id="first" popover>
  │
  ├── <button popovertarget="second">2</button> // Opens the second popover
  ├── <div id="second" popover>
  │
  ├── <button popovertarget="third">3</button> // Opens the third popover
  ├── <div id="third" popover>
  │
  ╰── ... // max 10 popovers

Responsive megamenu with small vertical menus

Each button must have a corresponding popover with the same id as the popovertarget value. HTML IDs must be unique.
<!-- popovertarget must match the ID of the corresponding popover, and each ID must be unique -->
<button class="btn sm:hidden" popovertarget="my-megamenu-1">Menu</button>
<div class="megamenu max-sm:megamenu-vertical p-2 border border-base-300" id="my-megamenu-1" popover="">
  <span class="megamenu-active"></span>
  <button popovertarget="a1">Services</button>
  <div id="a1" popover="">
    <ul class="menu">
      <li><a>Enterprise</a></li>
      <li><a>CRM software</a></li>
      <li><a>Security</a></li>
      <li><a>Consulting</a></li>
    </ul>
  </div>
  <button popovertarget="a2">AI</button>
  <div id="a2" popover="">
    <ul class="menu">
      <li><a>AI infrastructure</a></li>
      <li><a>Image generation</a></li>
      <li><a>MCP servers</a></li>
    </ul>
  </div>
  <button popovertarget="a3">Cloud Solutions</button>
  <div id="a3" popover="">
    <ul class="menu">
      <li><a>Cloud computing</a></li>
      <li><a>Storage solutions</a></li>
      <li><a>Database services</a></li>
      <li><a>CDN performance</a></li>
    </ul>
  </div>
</div>
Component.fragment([
  Btn(
    [Component.text('Menu')],
    classes: 'sm:hidden',
    attributes: {'popovertarget': 'my-megamenu-1'},
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('Services')], attributes: {'popovertarget': 'a1'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('Enterprise')], href: '#')]),
              li([a([Component.text('CRM software')], href: '#')]),
              li([a([Component.text('Security')], href: '#')]),
              li([a([Component.text('Consulting')], href: '#')]),
            ],
          ),
        ],
        id: 'a1',
        attributes: {'popover': ''},
      ),
      button([Component.text('AI')], attributes: {'popovertarget': 'a2'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('AI infrastructure')], href: '#')]),
              li([a([Component.text('Image generation')], href: '#')]),
              li([a([Component.text('MCP servers')], href: '#')]),
            ],
          ),
        ],
        id: 'a2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Cloud Solutions')], attributes: {'popovertarget': 'a3'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('Cloud computing')], href: '#')]),
              li([a([Component.text('Storage solutions')], href: '#')]),
              li([a([Component.text('Database services')], href: '#')]),
              li([a([Component.text('CDN performance')], href: '#')]),
            ],
          ),
        ],
        id: 'a3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'max-sm:megamenu-vertical p-2 border border-base-300',
    id: 'my-megamenu-1',
    attributes: {'popover': ''},
  ),
]);

Megamenu with wide popovers and horizontal menus

<button class="btn sm:hidden" popovertarget="my-megamenu-2">Menu</button>
<div class="megamenu max-sm:megamenu-vertical megamenu-wide p-2 border border-base-300" id="my-megamenu-2" popover="">
  <span class="megamenu-active"></span>
  <button popovertarget="b1">One</button>
  <div id="b1" popover="">
    <ul class="menu menu-horizontal">
      <li><a>Enterprise</a></li>
      <li><a>CRM software</a></li>
      <li><a>Security</a></li>
      <li><a>Consulting</a></li>
    </ul>
  </div>
  <button popovertarget="b2">Two</button>
  <div id="b2" popover="">
    <ul class="menu menu-horizontal">
      <li><a>AI infrastructure</a></li>
      <li><a>Image generation</a></li>
      <li><a>MCP servers</a></li>
    </ul>
  </div>
  <button popovertarget="b3">Three</button>
  <div id="b3" popover="">
    <ul class="menu menu-horizontal">
      <li><a>Cloud computing</a></li>
      <li><a>Storage solutions</a></li>
      <li><a>Database services</a></li>
      <li><a>CDN performance</a></li>
    </ul>
  </div>
</div>
Component.fragment([
  Btn(
    [Component.text('Menu')],
    classes: 'sm:hidden',
    attributes: {'popovertarget': 'my-megamenu-2'},
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'b1'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('Enterprise')], href: '#')]),
              li([a([Component.text('CRM software')], href: '#')]),
              li([a([Component.text('Security')], href: '#')]),
              li([a([Component.text('Consulting')], href: '#')]),
            ],
            direction: MenuDirection.horizontal,
          ),
        ],
        id: 'b1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'b2'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('AI infrastructure')], href: '#')]),
              li([a([Component.text('Image generation')], href: '#')]),
              li([a([Component.text('MCP servers')], href: '#')]),
            ],
            direction: MenuDirection.horizontal,
          ),
        ],
        id: 'b2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'b3'}),
      div(
        [
          Menu(
            [
              li([a([Component.text('Cloud computing')], href: '#')]),
              li([a([Component.text('Storage solutions')], href: '#')]),
              li([a([Component.text('Database services')], href: '#')]),
              li([a([Component.text('CDN performance')], href: '#')]),
            ],
            direction: MenuDirection.horizontal,
          ),
        ],
        id: 'b3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'max-sm:megamenu-vertical p-2 border border-base-300',
    modifier: MegamenuModifier.wide,
    id: 'my-megamenu-2',
    attributes: {'popover': ''},
  ),
]);

Megamenu in a navbar

<div class="navbar bg-base-100 shadow-sm">
  <div class="navbar-start">
    <a class="btn btn-ghost text-xl">daisyUI</a>
  </div>
  <div class="navbar-center">
    <div class="megamenu max-sm:megamenu-vertical megamenu-full" id="my-megamenu-4" popover="">
      <span class="megamenu-active"></span>
      <button popovertarget="d1">One</button>
      <div id="d1" popover="">
        <div class="flex max-sm:flex-col items-start">
          <ul class="menu w-full md:menu-horizontal">
            <li>
              <a>Enterprise</a>
              <ul>
                <li><a>CRM software</a></li>
                <li><a>Marketing management</a></li>
                <li><a>Security</a></li>
                <li><a>Consulting</a></li>
              </ul>
            </li>
            <li>
              <a>Company</a>
              <ul>
                <li><a>About us</a></li>
                <li><a>Contact us</a></li>
                <li><a>Privacy policy</a></li>
                <li><a>Press kit</a></li>
              </ul>
            </li>
          </ul>
          <img src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp" class="md:max-w-sm max-md:hidden" alt="Tailwind CSS megamenu" />
        </div>
      </div>
      <button popovertarget="d2">Two</button>
      <div id="d2" popover="">
        <div class="flex max-sm:flex-col items-start">
          <ul class="menu w-full md:menu-horizontal">
            <li>
              <a>Enterprise</a>
              <ul>
                <li><a>CRM software</a></li>
                <li><a>Marketing management</a></li>
                <li><a>Security</a></li>
                <li><a>Consulting</a></li>
                <li><a>Privacy policy</a></li>
                <li><a>Press kit</a></li>
              </ul>
            </li>
            <li>
              <a>Products</a>
              <ul>
                <li><a>UI Kit</a></li>
                <li><a>WordPress themes</a></li>
                <li><a>WordPress plugins</a></li>
                <li><a>Color picker app</a></li>
                <li><a>About us</a></li>
                <li><a>Contact us</a></li>
              </ul>
            </li>
          </ul>
          <img src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp" class="md:max-w-sm max-md:hidden" alt="Tailwind CSS megamenu component" />
        </div>
      </div>
      <button popovertarget="d3">Three</button>
      <div id="d3" popover="">
        <div class="flex max-sm:flex-col items-start">
          <ul class="menu w-full md:menu-horizontal">
            <li>
              <a>Solutions</a>
              <ul>
                <li><a>Design</a></li>
                <li><a>Development</a></li>
                <li><a>Hosting</a></li>
                <li><a>Domain register</a></li>
              </ul>
            </li>
            <li>
              <a>Products</a>
              <ul>
                <li><a>UI Kit</a></li>
                <li>
                  <a>Open source</a>
                  <ul>
                    <li><a>Auth management system</a></li>
                    <li><a>VScode theme</a></li>
                    <li><a>Color picker app</a></li>
                  </ul>
                </li>
              </ul>
            </li>
            <li>
              <a>Company</a>
              <ul>
                <li><a>About us</a></li>
                <li><a>Contact us</a></li>
                <li><a>Privacy policy</a></li>
                <li><a>Press kit</a></li>
              </ul>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <div class="navbar-end">
    <a class="btn">Login</a>
    <button class="btn sm:hidden" popovertarget="my-megamenu-4">Menu</button>
  </div>
</div>
Navbar(
  [
    NavbarStart([a([Component.text('daisyUI')], classes: 'btn btn-ghost text-xl', href: '#')]),
    NavbarCenter(
      [
        Megamenu(
          [
            MegamenuActive(const []),
            button([Component.text('One')], attributes: {'popovertarget': 'd1'}),
            div(
              [
                div(
                  [
                    Menu(
                      [
                        li(
                          [
                            a([Component.text('Enterprise')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('CRM software')], href: '#')]),
                                li([a([Component.text('Marketing management')], href: '#')]),
                                li([a([Component.text('Security')], href: '#')]),
                                li([a([Component.text('Consulting')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                        li(
                          [
                            a([Component.text('Company')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('About us')], href: '#')]),
                                li([a([Component.text('Contact us')], href: '#')]),
                                li([a([Component.text('Privacy policy')], href: '#')]),
                                li([a([Component.text('Press kit')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                      ],
                      classes: 'w-full md:menu-horizontal',
                    ),
                    img(
                      classes: 'md:max-w-sm max-md:hidden',
                      src: 'https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp',
                      alt: 'Tailwind CSS megamenu',
                    ),
                  ],
                  classes: 'flex max-sm:flex-col items-start',
                ),
              ],
              id: 'd1',
              attributes: {'popover': ''},
            ),
            button([Component.text('Two')], attributes: {'popovertarget': 'd2'}),
            div(
              [
                div(
                  [
                    Menu(
                      [
                        li(
                          [
                            a([Component.text('Enterprise')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('CRM software')], href: '#')]),
                                li([a([Component.text('Marketing management')], href: '#')]),
                                li([a([Component.text('Security')], href: '#')]),
                                li([a([Component.text('Consulting')], href: '#')]),
                                li([a([Component.text('Privacy policy')], href: '#')]),
                                li([a([Component.text('Press kit')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                        li(
                          [
                            a([Component.text('Products')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('UI Kit')], href: '#')]),
                                li([a([Component.text('WordPress themes')], href: '#')]),
                                li([a([Component.text('WordPress plugins')], href: '#')]),
                                li([a([Component.text('Color picker app')], href: '#')]),
                                li([a([Component.text('About us')], href: '#')]),
                                li([a([Component.text('Contact us')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                      ],
                      classes: 'w-full md:menu-horizontal',
                    ),
                    img(
                      classes: 'md:max-w-sm max-md:hidden',
                      src: 'https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp',
                      alt: 'Tailwind CSS megamenu component',
                    ),
                  ],
                  classes: 'flex max-sm:flex-col items-start',
                ),
              ],
              id: 'd2',
              attributes: {'popover': ''},
            ),
            button([Component.text('Three')], attributes: {'popovertarget': 'd3'}),
            div(
              [
                div(
                  [
                    Menu(
                      [
                        li(
                          [
                            a([Component.text('Solutions')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('Design')], href: '#')]),
                                li([a([Component.text('Development')], href: '#')]),
                                li([a([Component.text('Hosting')], href: '#')]),
                                li([a([Component.text('Domain register')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                        li(
                          [
                            a([Component.text('Products')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('UI Kit')], href: '#')]),
                                li(
                                  [
                                    a([Component.text('Open source')], href: '#'),
                                    ul(
                                      [
                                        li(
                                          [a([Component.text('Auth management system')], href: '#')],
                                        ),
                                        li([a([Component.text('VScode theme')], href: '#')]),
                                        li([a([Component.text('Color picker app')], href: '#')]),
                                      ],
                                    ),
                                  ],
                                ),
                              ],
                            ),
                          ],
                        ),
                        li(
                          [
                            a([Component.text('Company')], href: '#'),
                            ul(
                              [
                                li([a([Component.text('About us')], href: '#')]),
                                li([a([Component.text('Contact us')], href: '#')]),
                                li([a([Component.text('Privacy policy')], href: '#')]),
                                li([a([Component.text('Press kit')], href: '#')]),
                              ],
                            ),
                          ],
                        ),
                      ],
                      classes: 'w-full md:menu-horizontal',
                    ),
                  ],
                  classes: 'flex max-sm:flex-col items-start',
                ),
              ],
              id: 'd3',
              attributes: {'popover': ''},
            ),
          ],
          classes: 'max-sm:megamenu-vertical',
          modifier: MegamenuModifier.full,
          id: 'my-megamenu-4',
          attributes: {'popover': ''},
        ),
      ],
    ),
    NavbarEnd(
      [
        a([Component.text('Login')], classes: 'btn', href: '#'),
        Btn(
          [Component.text('Menu')],
          classes: 'sm:hidden',
          attributes: {'popovertarget': 'my-megamenu-4'},
        ),
      ],
    ),
  ],
  classes: 'bg-base-100 shadow-sm',
);

megamenu without arrows

Content for the first item
Content for the second item
<div class="megamenu p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button class="after:content-none" popovertarget="e1">One</button>
  <div id="e1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button class="after:content-none" popovertarget="e2">Two</button>
  <div id="e2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
</div>
Megamenu(
  [
    MegamenuActive(const []),
    button(
      [Component.text('One')],
      classes: 'after:content-none',
      attributes: {'popovertarget': 'e1'},
    ),
    div(
      [div([Component.text('Content for the first item')], classes: 'p-4')],
      id: 'e1',
      attributes: {'popover': ''},
    ),
    button(
      [Component.text('Two')],
      classes: 'after:content-none',
      attributes: {'popovertarget': 'e2'},
    ),
    div(
      [div([Component.text('Content for the second item')], classes: 'p-4')],
      id: 'e2',
      attributes: {'popover': ''},
    ),
  ],
  classes: 'p-2 border border-base-300',
);

Megamenu in different sizes

Content for the first item
Content for the second item
Content for the third item
Content for the first item
Content for the second item
Content for the third item
Content for the first item
Content for the second item
Content for the third item
Content for the first item
Content for the second item
Content for the third item
Content for the first item
Content for the second item
Content for the third item
<div class="megamenu megamenu-xs p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button popovertarget="f1">One</button>
  <div id="f1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button popovertarget="f2">Two</button>
  <div id="f2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
  <button popovertarget="f3">Three</button>
  <div id="f3" popover="">
    <div class="p-4">Content for the third item</div>
  </div>
</div>
<div class="megamenu megamenu-sm p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button popovertarget="g1">One</button>
  <div id="g1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button popovertarget="g2">Two</button>
  <div id="g2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
  <button popovertarget="g3">Three</button>
  <div id="g3" popover="">
    <div class="p-4">Content for the third item</div>
  </div>
</div>
<div class="megamenu megamenu-md p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button popovertarget="h1">One</button>
  <div id="h1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button popovertarget="h2">Two</button>
  <div id="h2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
  <button popovertarget="h3">Three</button>
  <div id="h3" popover="">
    <div class="p-4">Content for the third item</div>
  </div>
</div>
<div class="megamenu megamenu-lg p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button popovertarget="i1">One</button>
  <div id="i1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button popovertarget="i2">Two</button>
  <div id="i2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
  <button popovertarget="i3">Three</button>
  <div id="i3" popover="">
    <div class="p-4">Content for the third item</div>
  </div>
</div>
<div class="megamenu megamenu-xl p-2 border border-base-300">
  <span class="megamenu-active"></span>
  <button popovertarget="j1">One</button>
  <div id="j1" popover="">
    <div class="p-4">Content for the first item</div>
  </div>
  <button popovertarget="j2">Two</button>
  <div id="j2" popover="">
    <div class="p-4">Content for the second item</div>
  </div>
  <button popovertarget="j3">Three</button>
  <div id="j3" popover="">
    <div class="p-4">Content for the third item</div>
  </div>
</div>
Component.fragment([
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'f1'}),
      div(
        [div([Component.text('Content for the first item')], classes: 'p-4')],
        id: 'f1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'f2'}),
      div(
        [div([Component.text('Content for the second item')], classes: 'p-4')],
        id: 'f2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'f3'}),
      div(
        [div([Component.text('Content for the third item')], classes: 'p-4')],
        id: 'f3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'p-2 border border-base-300',
    size: MegamenuSize.xs,
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'g1'}),
      div(
        [div([Component.text('Content for the first item')], classes: 'p-4')],
        id: 'g1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'g2'}),
      div(
        [div([Component.text('Content for the second item')], classes: 'p-4')],
        id: 'g2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'g3'}),
      div(
        [div([Component.text('Content for the third item')], classes: 'p-4')],
        id: 'g3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'p-2 border border-base-300',
    size: MegamenuSize.sm,
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'h1'}),
      div(
        [div([Component.text('Content for the first item')], classes: 'p-4')],
        id: 'h1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'h2'}),
      div(
        [div([Component.text('Content for the second item')], classes: 'p-4')],
        id: 'h2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'h3'}),
      div(
        [div([Component.text('Content for the third item')], classes: 'p-4')],
        id: 'h3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'p-2 border border-base-300',
    size: MegamenuSize.md,
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'i1'}),
      div(
        [div([Component.text('Content for the first item')], classes: 'p-4')],
        id: 'i1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'i2'}),
      div(
        [div([Component.text('Content for the second item')], classes: 'p-4')],
        id: 'i2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'i3'}),
      div(
        [div([Component.text('Content for the third item')], classes: 'p-4')],
        id: 'i3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'p-2 border border-base-300',
    size: MegamenuSize.lg,
  ),
  Megamenu(
    [
      MegamenuActive(const []),
      button([Component.text('One')], attributes: {'popovertarget': 'j1'}),
      div(
        [div([Component.text('Content for the first item')], classes: 'p-4')],
        id: 'j1',
        attributes: {'popover': ''},
      ),
      button([Component.text('Two')], attributes: {'popovertarget': 'j2'}),
      div(
        [div([Component.text('Content for the second item')], classes: 'p-4')],
        id: 'j2',
        attributes: {'popover': ''},
      ),
      button([Component.text('Three')], attributes: {'popovertarget': 'j3'}),
      div(
        [div([Component.text('Content for the third item')], classes: 'p-4')],
        id: 'j3',
        attributes: {'popover': ''},
      ),
    ],
    classes: 'p-2 border border-base-300',
    size: MegamenuSize.xl,
  ),
]);