skills/storefront-ui/mega-menu-builder/SKILL.md
Build a rich navigation mega menu with product images, category highlights, featured banners, and keyboard-accessible dropdowns for large catalogs
npx skillsauth add finsilabs/awesome-ecommerce-skills mega-menu-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build a horizontal navigation bar that expands into full-width panels containing category columns, featured product cards, and promotional banners. The mega menu is driven by content manageable in your platform's admin, supports keyboard navigation and screen readers, and degrades gracefully to a mobile hamburger drawer.
| Platform | Recommended Approach | Why | |----------|---------------------|-----| | Shopify | Configure nested menus in Navigation admin + use an OS2.0 theme that supports mega menus (Impulse, Empire, Prestige) or install Meteor Mega Menu app | Shopify's Navigation admin supports 3-level menus; premium themes like Impulse include built-in mega menu sections with image and banner support | | WooCommerce | Use Max Mega Menu plugin (free/pro) or WP Mega Menu with your existing WordPress theme | Max Mega Menu integrates with any WordPress theme, adds image widgets and custom content to any menu item, and works with Elementor and Gutenberg | | BigCommerce | Use Header & Navigation section in the Theme Editor with a theme that supports mega menus (Cornerstone Advanced, Merchant); or install Shogun page builder which includes mega menu blocks | BigCommerce themes vary in mega menu support; Cornerstone Advanced has a built-in mega menu; Shogun adds it to any theme | | Custom / Headless | Build a data-driven mega menu component with hover/focus open logic, keyboard navigation (arrow keys, Escape), and a mobile accordion drawer | Full control over content model, animations, and accessibility patterns; see implementation below |
Configuring nested navigation:
Enabling mega menu in a compatible theme:
If using a theme with built-in mega menu support (Impulse, Prestige, Empire):
Using Meteor Mega Menu app (works with any Shopify theme):
Using Max Mega Menu (free tier):
Integrating with Elementor: If your store uses Elementor, install Happy Addons or ElementsKit — both include a drag-and-drop mega menu builder that works within Elementor's visual editor.
Cornerstone Advanced theme:
Shogun page builder:
Navigation component with hover/focus open logic:
// MegaNav.jsx
import { useState, useRef } from 'react';
export function MegaNav({ items }) {
const [activeItem, setActiveItem] = useState(null);
const closeTimer = useRef(null);
function openMenu(id) { clearTimeout(closeTimer.current); setActiveItem(id); }
function scheduleClose() { closeTimer.current = setTimeout(() => setActiveItem(null), 150); }
function cancelClose() { clearTimeout(closeTimer.current); }
return (
<nav aria-label="Main navigation">
<ul role="menubar" className="nav-bar">
{items.map(item => (
<li key={item.id} role="none"
onMouseEnter={() => item.megaMenu && openMenu(item.id)}
onMouseLeave={scheduleClose}>
<a href={item.url} role="menuitem"
aria-haspopup={item.megaMenu ? 'true' : undefined}
aria-expanded={activeItem === item.id ? 'true' : undefined}
onFocus={() => item.megaMenu && openMenu(item.id)}
onKeyDown={(e) => {
if ((e.key === 'ArrowDown' || e.key === 'Enter') && item.megaMenu) {
e.preventDefault();
openMenu(item.id);
document.querySelector(`#panel-${item.id} a`)?.focus();
}
if (e.key === 'Escape') setActiveItem(null);
}}>
{item.label}
</a>
{item.megaMenu && activeItem === item.id && (
<MegaPanel id={`panel-${item.id}`} panel={item.megaMenu}
onMouseEnter={cancelClose} onMouseLeave={scheduleClose}
onClose={() => setActiveItem(null)} />
)}
</li>
))}
</ul>
</nav>
);
}
Mega panel layout (columns + featured products + banner):
function MegaPanel({ id, panel, onMouseEnter, onMouseLeave, onClose }) {
return (
<div id={id} className="mega-panel" role="region"
onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>
<div className="mega-panel-inner">
<div className="mega-columns">
{panel.columns.map(col => (
<div key={col.heading} className="mega-column">
<p className="column-heading">{col.heading}</p>
<ul>
{col.links.map(link => (
<li key={link.url}><a href={link.url} onClick={onClose}>{link.label}</a></li>
))}
</ul>
</div>
))}
</div>
{panel.banner && (
<a href={panel.banner.url} className="mega-banner" onClick={onClose}>
<img src={panel.banner.image} alt={panel.banner.alt} loading="lazy" />
<span className="banner-cta">{panel.banner.cta}</span>
</a>
)}
</div>
</div>
);
}
.mega-panel {
position: absolute; top: 100%; left: 0; width: 100vw;
background: #fff; border-top: 2px solid #e2e8f0;
box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 100;
}
.mega-panel-inner {
display: grid; grid-template-columns: 1fr 1fr 1fr 200px;
gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 2rem;
}
@media (max-width: 768px) { .mega-panel { display: none; } }
All platforms need a touch-friendly mobile navigation to replace the desktop mega menu:
<dialog> or position:fixed side drawer with accordion-style category expansion; apply overflow:hidden to <body> when openposition:absolute on the nav bar — not on the individual list item, so the panel spans full viewport widthloading="lazy" since they are not above the fold| Problem | Solution |
|---------|----------|
| Panel closes when moving cursor diagonally from nav item to panel | Use a 150–200 ms setTimeout delay before closing; cancel it when cursor enters the panel |
| Keyboard users cannot reach panel links | Use aria-haspopup and aria-expanded; move focus into the panel on Enter/Space/ArrowDown |
| Mobile drawer scrolls the body behind it | Apply overflow:hidden to <body> when drawer is open; restore on close |
| Banner images cause layout shift | Set explicit width and height attributes on banner <img> elements |
| Nav overlaps sticky content on scroll | Set position:sticky; top:0; z-index:50 on the nav; give the mega panel z-index:100 |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion