Navigation Active States
Make it unambiguous where the user is, at every level of nested navigation.
Paste this into your agent.
A user should never have to check the URL bar to figure out where they are in an app. Weak or missing active states in nav are one of the most common causes of "I feel lost" feedback in usability tests.
When to use
- Top-level nav bars, sidebars, tabs, breadcrumbs, and any nested navigation (settings sub-nav, multi-level sidebars).
Principles
- The active indicator needs to be visible at a glance, without requiring the user to read label text and compare it to the URL.
- Nested navigation needs an active state at every level, not just the deepest one — a settings page three levels deep should show all three ancestor sections as active/highlighted.
- Active and hover states must be visually distinct from each other; if they look the same, users can't tell if they're currently viewing a section or just pointing at it.
Instructions
- Use more than color alone for the active indicator — color-blind users need a second signal (weight change, background fill, left-border accent, icon fill vs. outline).
- For sidebars, highlight the full row (background) rather than just the text, so the active state is scannable in peripheral vision.
- In nested nav, propagate the active state upward: if a child route is active, its parent section should also show as active (even if less prominently).
- Match nav active-state logic to actual routing — use
startsWithmatching for parent sections, exact matching for leaf items, so a sub-page correctly keeps its parent highlighted. - Keep a consistent active-state treatment across all nav surfaces in the product (top nav, sidebar, tabs) — don't invent a new visual language for each one.
Examples
tsxconst isActive = pathname === href || pathname.startsWith(href + "/");
<Link
href={href}
className={isActive ? "bg-accent-subtle text-accent font-medium" : "text-secondary"}
>
Avoid
- Don't rely solely on a bold font-weight change for active state — it's too subtle to notice at a glance, especially in a sidebar with many items.
- Don't make the active state indistinguishable from a disabled/inactive item — the color/weight direction should be opposite (more emphasis, not less).
References
- Nielsen Norman Group research on navigation and wayfinding in the "Is There a Users' Manual?" and related usability studies.
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
12 Principles of Animationby raphaelsalaja
Apply Disney's 12 animation principles to web interfaces to make motion feel natural, organic, and human.
MotionExternalGitHub stars: 42
Animation Vocabularyby emilkowalski
Sharpen motion language so animation choices feel deliberate and consistent.
MotionExternalGitHub stars: 51.4K
Antfu Designby antfu
antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.
LayoutExternalGitHub stars: 6K
Apple Designby emilkowalski
Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.
MotionExternalGitHub stars: 51.4K