accordion
FreeUse when implementing expand and collapse content sections.
The English summary is being prepared. Showing the original description.
Use when you need to organize and structure site navigation.
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
Organize and structure site navigation
Navigation Menu is the primary horizontal or vertical bar of links that helps users move between the main sections of a website or application. It is the backbone of site architecture, giving users a persistent map of what the site offers and where they currently are. A well-built navigation menu balances visibility, hierarchy, and responsiveness — always adapting to viewport size while remaining accessible to keyboard and screen reader users.
Use Navigation Menu to provide persistent, structured access to the main sections of a website or app. Common scenarios include:
references/pattern.md, then choose the smallest viable variation.Do's ✅
<nav> element with aria-label for screen reader landmark navigationaria-current="page" on the active link<button> with aria-expanded and aria-haspopup for dropdown triggers<div> with click handlers instead of semantic <nav>, <ul>, <a>, or <button><nav> elements without distinct aria-label valuesposition: sticky not JavaScript-based)Semantic HTML (No JS Needed for Basic Nav)```html
<nav aria-label="Main navigation"> <ul>The Problem: Cramming 10+ items into the primary navigation bar causes wrapping, overflow, or truncated labels.
How to Fix It: Limit to 5-7 top-level items. Group excess items under broader categories or move them to a secondary navigation bar.
The Problem: Users can't tell which page they're on because no navigation item is visually highlighted.
How to Fix It:
Style the current page's navigation link distinctly (color, weight, underline) and add aria-current="page" for screen readers.
The Problem: Keyboard users and touch-device users cannot access dropdown submenus that only respond to mouse hover.
How to Fix It: Use click/tap to toggle dropdowns. Support Enter/Space to open and Escape to close for keyboard users.
For full implementation detail, examples, and testing notes, see references/pattern.md.
Pattern page: https://uxpatterns.dev/patterns/navigation/navigation-menu
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Use when implementing expand and collapse content sections.
The English summary is being prepared. Showing the original description.
Use when implementing user account configuration and preferences.
The English summary is being prepared. Showing the original description.
Use when implementing social activity and updates stream.
The English summary is being prepared. Showing the original description.
Use when implementing conversational AI chat interfaces.
The English summary is being prepared. Showing the original description.
Use when implementing handling AI-specific errors.
The English summary is being prepared. Showing the original description.
Use when implementing loading states for AI operations.
The English summary is being prepared. Showing the original description.