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
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
Navbar11
Prop | Type | Default | Description |
---|---|---|---|
navigationLinks | Navbar11NavItem[] | defaultNavigationLinks | Array of navigation menu items |
accountTypes | Navbar11AccountType[] | defaultAccountTypes | Array of available account type options |
defaultAccountType | string | "personal" | Default selected account type |
projects | Navbar11Project[] | defaultProjects | Array of available project options |
defaultProject | string | "1" | Default selected project |
userName | string | "John Doe" | Display name for the user profile |
userEmail | string | "[email protected]" | Email address for the user profile |
userAvatar | string | undefined | URL for user avatar image |
onNavItemClick | (href: string) => void | undefined | Callback for navigation item clicks |
onAccountTypeChange | (accountType: string) => void | undefined | Callback for account type selection changes |
onProjectChange | (project: string) => void | undefined | Callback for project selection changes |
onSettingsItemClick | (item: string) => void | undefined | Callback for settings menu item clicks |
onUserItemClick | (item: string) => void | undefined | Callback 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
Centered Logo Navigation Bar
Productivity-focused navigation bar with centered logo, icon-based navigation, and upgrade button. Features balanced three-section layout with user management and premium upgrade prompts for SaaS applications.
Team Switcher Navigation Bar
Social platform navigation bar with team switcher, icon-based navigation, notifications, and action buttons. Features centered icon navigation, team selector, and comprehensive notification management for collaborative applications.