Skip to main content
Locations:
  • sabo/src/components/dashboard/nav-main.tsx
  • sabo/src/components/dashboard/nav-secondary.tsx
  • sabo/src/components/dashboard/nav-user.tsx
  • sabo/src/components/dashboard/nav-projects.tsx

When to use

  • Build structured menus grouped by purpose (main vs secondary vs user vs projects).

Usage

These components are used inside app-sidebar.tsx:
src/components/dashboard/app-sidebar.tsx

Key features

  • NavMain: Collapsible navigation with icons and nested sub-items
  • NavSecondary: Simple link list for support/feedback type links
  • NavUser: User profile dropdown in sidebar footer
  • NavProjects: Project/workspace quick switcher

Customization

1

Configure nav-main items

Edit the items prop in app-sidebar.tsx. Each item supports:
  • title - Display text
  • url - Target route
  • icon - Lucide React icon component
  • isActive - Whether to highlight (computed from pathname)
  • items - Array of sub-items for collapsible menus
2

Add nav-secondary links

Simple flat links for support, feedback, or external resources:
3

Wire nav-projects

Quick links to projects or workspaces:
4

Handle external links

For external URLs (e.g., docs, changelog), use full https:// URLs. The nav components will detect and render them with appropriate target="_blank" attributes.

Troubleshooting

  • Sub-items not showing
    • Ensure parent item has items array populated
  • Active state not working
    • Check isActive is computed correctly using usePathname()
  • External links opening in same tab
    • Verify URL starts with http:// or https://