본문으로 건너뛰기
cccskills
무료GitHub에 공개

megamenu

Use when you need to display a large number of links in a single menu.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.8 KB
  • references/pattern.md24.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Megamenu

Display a large number of links in a single menu

What it solves

Megamenu is a large, multi-column dropdown panel that expands from a navigation bar to reveal a structured collection of links, categories, and sometimes promotional content. Unlike standard dropdown menus, megamenus use the full or near-full width of the page to organize many navigation options at once. Megamenus help users scan large navigation structures without repeated clicking, making them a staple on enterprise, e-commerce, and content-heavy websites.

When to use

Use Megamenu to expose a large set of categorized navigation options in a single, scannable panel. Common scenarios include:

  • E-commerce sites with dozens of product categories and subcategories
  • Enterprise platforms with many features organized by domain
  • University or government sites with extensive departmental navigation
  • News portals with numerous editorial sections and subsections
  • SaaS products with complex feature sets needing organized access

When to avoid

  • Sites with fewer than 10-15 total navigation links (a simple dropdown suffices)
  • Mobile-only applications where screen width is insufficient
  • Single-purpose landing pages with minimal navigation needs
  • Sites where simplicity and speed-of-access are paramount over breadth
  • When analytics show users prefer search over browsing categories

Implementation workflow

  1. Confirm the pattern matches the problem and constraints before copying the example.
  2. Start from the anatomy and examples in references/pattern.md, then choose the smallest viable variation.
  3. Apply accessibility, performance, and interaction guardrails before layering visual polish.
  4. Use the testing guidance to verify behavior across keyboard, screen reader, responsive, and failure scenarios.

Accessibility guardrails

Do's ✅

  • Use aria-haspopup="true" and aria-expanded on trigger buttons
  • Support keyboard navigation: Enter/Space to open, Escape to close, Arrow keys to move between items
  • Include category headings as non-interactive labels (role="presentation" or heading elements)
  • Ensure all links are reachable via Tab key within the open panel
  • Close the panel when focus leaves the megamenu entirely Don'ts ❌
  • Don't open the megamenu only on hover without a click/keyboard alternative
  • Don't trap focus inside the panel permanently — allow Tab to leave and close the menu
  • Don't use custom roles incorrectly (avoid role="menu" unless implementing full menu keyboard pattern)

Performance guardrails

Target Metrics

  • Panel render: < 100ms from trigger activation to visible panel
  • Hover intent delay: 200-300ms to prevent accidental triggers
  • Animation: 200ms at 60fps for open/close transitions
  • DOM nodes: Minimize — lazy render panel content only on first open
  • Bundle size: < 5KB for megamenu component logic

Optimization Strategies

Lazy Render Panel Content

const [hasOpened, setHasOpened] = useState(false);
const open = () => { setHasOpened(true); setIsOpen(true); };
// Only render panel DOM after first open
{hasOpened && }

Common mistakes

No Hover Intent Delay

The Problem: The megamenu opens instantly on mouse enter, causing accidental triggers as users move across the navigation bar.

How to Fix It: Add a 200-300ms hover intent delay before opening. Use a timer that cancels if the mouse leaves the trigger before the delay completes.

Panel Closes When Moving Mouse to It

The Problem: A gap between the trigger and the panel causes mouseleave to fire on the trigger before mouseenter fires on the panel, closing the menu.

How to Fix It: Use a shared close delay (300ms) that is cancelled when the mouse enters the panel. Alternatively, create an invisible "bridge" element connecting the trigger to the panel.

No Keyboard Navigation

The Problem: Users can only access the megamenu with a mouse. Keyboard users cannot open, navigate, or close the panel.

How to Fix It: Support Enter/Space to toggle, Escape to close, and Arrow keys or Tab to navigate between links. Return focus to the trigger on close.

Related patterns


For full implementation detail, examples, and testing notes, see references/pattern.md.

Pattern page: https://uxpatterns.dev/patterns/navigation/megamenu

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

accordion

무료

Use when implementing expand and collapse content sections.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

Use when implementing user account configuration and preferences.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

Use when implementing social activity and updates stream.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

ai-chat

무료

Use when implementing conversational AI chat interfaces.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

Use when implementing handling AI-specific errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

Use when implementing loading states for AI operations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedaviddias/ux-patterns-for-developers2662026년 10월 5일 업데이트

thedaviddias의 스킬 모두 보기

이 스킬의 문제 신고