Implementing navigation
Skill ancoleman/ai-design-components/skills/implementing-navigation
Implements navigation patterns and routing for both frontend (React/TS) and backend (Python) including menus, tabs, breadcrumbs, client-side routing, and server-side route configuration. Use when building navigation systems or setting up routing.From its SKILL.md
npx -y skills add ancoleman/ai-design-components --skill implementing-navigationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
7.1 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Navigation Patterns & Routing Implementation
Purpose
This skill provides comprehensive guidance for implementing navigation systems across both frontend and backend applications. It covers client-side navigation patterns (menus, tabs, breadcrumbs) and routing (React Router, Next.js) as well as server-side route configuration (Flask, Django, FastAPI).
When to Use
Use this skill when:
- Building primary navigation (top, side, mega menus)
- Implementing secondary navigation (breadcrumbs, tabs, pagination)
- Setting up client-side routing (React Router, Next.js)
- Configuring server-side routes (Flask, Django, FastAPI)
- Creating mobile navigation patterns (hamburger, bottom nav)
- Implementing keyboard-accessible navigation
- Building command palettes or search-driven navigation
- Creating multi-step wizards or steppers
- Ensuring WCAG 2.1 AA compliance for navigation
Navigation Decision Framework
Information Architecture → Navigation Pattern
Flat (1-2 levels) → Top Navigation
Deep (3+ levels) → Side Navigation
E-commerce/Large → Mega Menu
Linear Process → Stepper/Wizard
Long Content → Table of Contents
Power Users → Command Palette
Multi-section Page → Tabs
Large Data Sets → Pagination
Frontend Navigation Components
Primary Navigation Patterns
Top Navigation (Horizontal)
- Best for shallow hierarchies, marketing sites
- 5-7 primary links maximum for cognitive load
- See
references/menu-patterns.mdfor implementation
Side Navigation (Vertical)
- Best for deep hierarchies, admin panels, dashboards
- Supports multi-level nesting and collapsible sections
- See
references/menu-patterns.mdfor sidebar patterns
Mega Menu
- Best for e-commerce, content-heavy sites
- Rich content with images and descriptions
- See
references/menu-patterns.mdfor mega menu structure
Secondary Navigation Components
Breadcrumbs
- Shows hierarchical path and current location
- Essential for deep sites and e-commerce
- See
references/navigation-components.mdfor breadcrumb patterns
Tabs
- Content switching without page reload
- URL synchronization for bookmarking
- See
references/navigation-components.mdfor tab implementation
Pagination
- For search results, product lists, articles
- Consider virtualization for performance
- See
references/navigation-components.mdfor pagination patterns
Client-Side Routing
React Router (Industry Standard)
- Type-safe routing with loader patterns
- Nested routes and lazy loading support
- See
references/client-routing.mdfor React Router patterns
Next.js App Router
- File-based routing with RSC support
- Parallel and intercepting routes
- See
references/client-routing.mdfor Next.js routing
Backend Routing Patterns
Python Web Frameworks
Flask
- Blueprint-based organization
- Route decorators and URL rules
- See
references/flask-routing.mdfor Flask patterns
Django
- URL configuration with namespaces
- Path converters and regex patterns
- See
references/django-urls.mdfor Django URL conf
FastAPI
- Router-based organization
- Path operations and dependencies
- See
references/fastapi-routing.mdfor FastAPI routers
Mobile Navigation
Patterns for Touch Devices
Hamburger Menu
- Slide-out drawer for primary navigation
- See
references/menu-patterns.mdfor mobile drawer
Bottom Navigation
- 3-5 primary actions, thumb-friendly
- See
references/menu-patterns.mdfor bottom nav
Tab Bar
- Horizontal scrollable tabs with swipe
- Natural for mobile-first applications
Accessibility Requirements
Keyboard Navigation
Tab → Move forward through links
Shift+Tab → Move backward through links
Enter → Activate link/button
Space → Activate button
Arrow keys → Navigate within menus
Escape → Close dropdowns/modals
ARIA Patterns
Essential ARIA attributes for accessible navigation:
- See
references/accessibility-navigation.mdfor complete ARIA patterns - Includes landmark roles, states, and properties
- Screen reader optimization techniques
Focus Management
- Visible focus indicators (2px minimum, 3:1 contrast)
- Focus trap for modals and dropdowns
- Skip navigation link for keyboard users
- See
references/accessibility-navigation.mdfor focus patterns
Implementation Utilities
Navigation Structure Management
Generate and validate navigation trees:
# Validate navigation structure
node scripts/validate_navigation_tree.js nav-config.json
# Generate breadcrumb trails
node scripts/calculate_breadcrumbs.js current-path
Route Generation (Python)
Generate route configurations:
# Generate Flask/Django/FastAPI routes
python scripts/generate_routes.py --framework flask --config routes.yaml
Code Examples
Frontend Examples
For working navigation implementations:
examples/horizontal-menu.tsx- Responsive top navigationexamples/tab-navigation.tsx- Tabs with URL syncexamples/mobile-navigation.tsx- Hamburger and drawer
Backend Examples
For routing configuration:
examples/flask_routes.py- Flask blueprint setupexamples/django_urls.py- Django URL patternsexamples/fastapi_routes.py- FastAPI router organization
Navigation Configuration
For complex navigation structures, use the configuration schema:
assets/navigation-config-schema.json- Navigation tree schemaassets/route-templates.json- Common route patterns
Validate configurations before implementation using the validation script.
Library Recommendations
Frontend Routing
React Router is the recommended solution for React applications:
- Industry standard with excellent TypeScript support
- Built-in accessibility with NavLink active states
- See
references/library-comparison.mdfor alternatives
Component Libraries
For rapid development, consider:
- Headless UI libraries (Radix UI, React Aria)
- Accessible by default
- Work with any styling approach
Progressive Enhancement
Build navigation that works without JavaScript:
- Server-rendered HTML navigation
- Progressive enhancement with client-side routing
- Fallback for JavaScript failures
Performance Considerations
- Lazy load route components
- Prefetch navigation targets
- Use route-based code splitting
- Implement loading states for navigation
Testing Navigation
Essential navigation tests:
- Keyboard navigation flow
- Screen reader announcements
- Mobile touch interactions
- Route parameter validation
- Deep linking functionality
Next Steps
- Analyze the information architecture
- Select appropriate navigation pattern
- Implement with accessibility first
- Add progressive enhancement
- Test across devices and assistive technologies
For detailed implementation guides, explore the referenced documentation files based on specific requirements.
What ships with it: 20 files
281.3 KB alongside SKILL.md, 6 of them executable
assets/
- navigation-config-schema.json9.6 KB
- route-templates.json11.5 KB
examples/
- django_urls.pyruns5.9 KB
- fastapi_routes.pyruns9.4 KB
- flask_routes.pyruns9.9 KB
- horizontal-menu.tsx8.6 KB
- mobile-navigation.tsx5.2 KB
- tab-navigation.tsx9.6 KB
references/
- accessibility-navigation.md23.0 KB
- client-routing.md17.7 KB
- django-urls.md19.1 KB
- fastapi-routing.md23.0 KB
- flask-routing.md20.0 KB
- library-comparison.md13.8 KB
- menu-patterns.md18.3 KB
- navigation-components.md25.1 KB
scripts/
- calculate_breadcrumbs.jsruns8.5 KB
- generate_routes.pyruns12.8 KB
- validate_navigation_tree.jsruns10.0 KB
- outputs.yaml20.3 KB
Gives 0 of the 12 instructions most data backend skills give in ~1.4k tokens
Counted across 258 of the 277 authors here whose files we hold, read 2026-09-06
- Centralize error handling in one handlerin 38 of 258, across 20 files
- Select only needed columns in queriesin 36 of 258, across 18 files
- Check cache before querying the databasein 36 of 258, across 19 files
- Wrap multi-step writes in transactionsin 36 of 258, across 18 files
- Retry failed requests with exponential backoffin 36 of 258, across 18 files
- Batch fetch related records to avoid N+1 queriesin 34 of 258, across 16 files
- Use resource-based URLs for REST endpointsin 31 of 258, across 13 files
- Separate business logic into a service layerin 29 of 258, across 17 files
- Queue background jobs instead of blocking requestsin 29 of 258, across 14 files
- Abstract data access behind repository interfacesin 25 of 258, across 13 files
- Log structured JSON with request contextin 15 of 258, across 7 files
- Use a shared store for rate limitingin 14 of 258, across 6 files
Said here and by no other author read
- analyze the information architecture
- select the matching navigation pattern
- implement with accessibility first
- build navigation that works without JavaScript
- add progressive enhancement
- lazy load route components
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.