Join our Discord community
Navbar

Context Switcher Navigation Bar

Multi-tenant navigation bar with account selector, project selector, and settings menu. Features breadcrumb-style context switching, dropdown navigation, and comprehensive settings management for enterprise applications.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/navbar-11.json
npx shadcn@latest add https://www.shadcn.io/registry/navbar-11.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/navbar-11.json
bunx shadcn@latest add https://www.shadcn.io/registry/navbar-11.json

Features

  • Context switching breadcrumbs with account type and project selectors for multi-tenant applications
  • Account type selector supporting Personal, Team, and Business account hierarchies
  • Project selector with dropdown for switching between multiple projects or workspaces
  • Settings menu with comprehensive configuration options and API key management
  • User profile menu with avatar display and account management options
  • Responsive navigation with mobile hamburger menu for primary navigation links
  • Enterprise-focused layout with right-aligned navigation and utility menus
  • TypeScript support with comprehensive interface definitions and callback functions
  • shadcn/ui integration using Breadcrumb, Select, and DropdownMenu components

Use Cases

This free open source React component works well for:

  • Multi-tenant SaaS platforms - Applications supporting multiple account types built with Next.js
  • Enterprise applications - Business tools requiring project and workspace switching using TypeScript
  • Team collaboration tools - Platforms with team and project-based organization using Tailwind CSS
  • Developer platforms - API-focused applications with comprehensive settings and project management

API Reference

PropTypeDefaultDescription
navigationLinksNavbar11NavItem[]defaultNavigationLinksArray of navigation menu items
accountTypesNavbar11AccountType[]defaultAccountTypesArray of available account type options
defaultAccountTypestring"personal"Default selected account type
projectsNavbar11Project[]defaultProjectsArray of available project options
defaultProjectstring"1"Default selected project
userNamestring"John Doe"Display name for the user profile
userEmailstring"[email protected]"Email address for the user profile
userAvatarstringundefinedURL for user avatar image
onNavItemClick(href: string) => voidundefinedCallback for navigation item clicks
onAccountTypeChange(accountType: string) => voidundefinedCallback for account type selection changes
onProjectChange(project: string) => voidundefinedCallback for project selection changes
onSettingsItemClick(item: string) => voidundefinedCallback for settings menu item clicks
onUserItemClick(item: string) => voidundefinedCallback for user menu item clicks

Context Switching Features

  • Account Type Selector - Switch between Personal, Team, and Business account contexts
  • Project Selector - Navigate between multiple projects or workspaces within an account
  • Breadcrumb Integration - Visual hierarchy showing Account Type / Project relationship
  • Persistent Context - Maintain user selections across application navigation

Settings Integration

  • Settings Menu - Comprehensive dropdown with preferences, billing, team settings, and integrations
  • API Management - Dedicated API keys section for developer-focused applications
  • Enterprise Options - Team settings and billing management for business accounts
  • Quick Access - Settings icon positioned near user profile for easy discovery

Implementation Notes

  • Uses shadcn/ui Breadcrumb component for semantic context switching structure
  • Supports keyboard navigation and accessibility standards through Radix UI components
  • Mobile navigation automatically collapses primary links to hamburger menu
  • Context selectors use standard Select components with ChevronsUpDown icons
  • All navigation items are non-functional for demonstration purposes with callback support
  • Compatible with shadcn/ui design system and Tailwind CSS styling framework
  • Settings menu provides comprehensive configuration options for enterprise applications
  • Right-aligned navigation emphasizes utility functions over primary content navigation