Repository navigation
feat(topnav): add XDSTopNavMegaMenu component - #354
Merged
Merged
Conversation
Adds a full-width mega menu variant for the top navigation bar. On hover, a nav item reveals a panel with menu items organized in a two-column grid and an optional featured content area on the right. - New XDSTopNavMegaMenu component with hover trigger + chevron - Two-column item grid with icon, title, and description - Optional featured section with image, title, description, and CTA - Configurable hover delay, hide delay, and single-column mode - Smooth fade + slide animation on open/close - Keyboard support (Escape to dismiss) - Proper ARIA attributes (aria-haspopup, aria-expanded, role=menu) - Sandbox demo page at /pages/mega-menu/ Co-authored-by: Navi <[email protected]>
rubyycheung
marked this pull request as draft
February 26, 2026 04:59
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsTopNav · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Component PreviewsIncludes interactive hover previews as animated GIFs. XDSTopNavDefaultScreenshot: Interaction Preview: (view video) View in Storybook · Centered With Start ContentScreenshot: View in Storybook · Center Content Without EndScreenshot: View in Storybook · Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
…aming convention The @xds/boolean-prop-naming lint rule requires boolean props to use 'is' or 'has' prefix. Renamed singleColumn → isSingleColumn in XDSTopNavMegaMenu and updated the sandbox page reference. Co-authored-by: Navi <[email protected]>
rubyycheung
marked this pull request as ready for review
February 26, 2026 05:07
rubyycheung
added this pull request to the merge queue
Feb 26, 2026
cixzhang
pushed a commit
that referenced
this pull request
Apr 26, 2026
* feat(topnav): add XDSTopNavMegaMenu component Adds a full-width mega menu variant for the top navigation bar. On hover, a nav item reveals a panel with menu items organized in a two-column grid and an optional featured content area on the right. - New XDSTopNavMegaMenu component with hover trigger + chevron - Two-column item grid with icon, title, and description - Optional featured section with image, title, description, and CTA - Configurable hover delay, hide delay, and single-column mode - Smooth fade + slide animation on open/close - Keyboard support (Escape to dismiss) - Proper ARIA attributes (aria-haspopup, aria-expanded, role=menu) - Sandbox demo page at /pages/mega-menu/ Co-authored-by: Navi <[email protected]> * fix(topnav): rename singleColumn to isSingleColumn per boolean prop naming convention The @xds/boolean-prop-naming lint rule requires boolean props to use 'is' or 'has' prefix. Renamed singleColumn → isSingleColumn in XDSTopNavMegaMenu and updated the sandbox page reference. Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]> Co-authored-by: thedjpetersen <[email protected]>
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* feat(topnav): add XDSTopNavMegaMenu component Adds a full-width mega menu variant for the top navigation bar. On hover, a nav item reveals a panel with menu items organized in a two-column grid and an optional featured content area on the right. - New XDSTopNavMegaMenu component with hover trigger + chevron - Two-column item grid with icon, title, and description - Optional featured section with image, title, description, and CTA - Configurable hover delay, hide delay, and single-column mode - Smooth fade + slide animation on open/close - Keyboard support (Escape to dismiss) - Proper ARIA attributes (aria-haspopup, aria-expanded, role=menu) - Sandbox demo page at /pages/mega-menu/ Co-authored-by: Navi <[email protected]> * fix(topnav): rename singleColumn to isSingleColumn per boolean prop naming convention The @xds/boolean-prop-naming lint rule requires boolean props to use 'is' or 'has' prefix. Renamed singleColumn → isSingleColumn in XDSTopNavMegaMenu and updated the sandbox page reference. Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]> Co-authored-by: thedjpetersen <[email protected]>
cixzhang
pushed a commit
that referenced
this pull request
Jun 21, 2026
* feat(topnav): add XDSTopNavMegaMenu component Adds a full-width mega menu variant for the top navigation bar. On hover, a nav item reveals a panel with menu items organized in a two-column grid and an optional featured content area on the right. - New XDSTopNavMegaMenu component with hover trigger + chevron - Two-column item grid with icon, title, and description - Optional featured section with image, title, description, and CTA - Configurable hover delay, hide delay, and single-column mode - Smooth fade + slide animation on open/close - Keyboard support (Escape to dismiss) - Proper ARIA attributes (aria-haspopup, aria-expanded, role=menu) - Sandbox demo page at /pages/mega-menu/ * fix(topnav): rename singleColumn to isSingleColumn per boolean prop naming convention The @xds/boolean-prop-naming lint rule requires boolean props to use 'is' or 'has' prefix. Renamed singleColumn → isSingleColumn in XDSTopNavMegaMenu and updated the sandbox page reference. --------- Co-authored-by: thedjpetersen <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a full-width mega menu variant for the top navigation bar. On hover over a nav item, a panel drops down with menu items organized in a two-column grid and an optional featured content area on the right.
New Component:
XDSTopNavMegaMenuFeatures
delayandhideDelayprops for hover behaviorsingleColumnprop for fewer itemsaria-haspopup,aria-expanded,role="menu",role="menuitem"Usage
Wrap
XDSTopNavin a container withposition: relativeso the mega menu panel spans the full nav width:Props
labelstringitemsXDSTopNavMegaMenuItemData[]featuredXDSTopNavMegaMenuFeatureddelaynumber150hideDelaynumber250singleColumnbooleanfalseTest Plan
npx tsc --noEmit— clean/pages/mega-menu/with two examples:Files Changed
packages/core/src/TopNav/XDSTopNavMegaMenu.tsxpackages/core/src/TopNav/index.tsapps/sandbox/src/app/pages/mega-menu/page.tsxapps/sandbox/src/app/Sidebar.tsxCrafted with care by Navi