Search and Toggle Navigation Bar
Feature-rich navigation bar with search functionality, test mode toggle, layout controls, and comprehensive menu system. Includes notifications, settings, info menu, and quick action buttons for productivity applications.
Powered by
Installation
npx shadcn@latest add https://www.shadcn.io/registry/navbar-14.json
npx shadcn@latest add https://www.shadcn.io/registry/navbar-14.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/navbar-14.json
bunx shadcn@latest add https://www.shadcn.io/registry/navbar-14.json
Features
- Search functionality with icon-decorated input field for content discovery
- Test mode toggle with labeled switch for development and production environments
- Layout grid button for accessing layout and view options
- Information menu with help, documentation, tutorials, and feedback options
- Notification system with unread count badge and detailed notification dropdown
- Settings menu with comprehensive configuration options and API management
- Quick add button with prominent rounded design for primary actions
- Responsive design with test mode hidden on mobile devices
- TypeScript support with comprehensive interface definitions and state management
Use Cases
This free open source React component works well for:
- Admin dashboards - Management interfaces with search, settings, and notifications using Next.js
- Development tools - Applications with test/production mode switching using TypeScript
- Content management - Platforms with search functionality and comprehensive menus using Tailwind CSS
- Productivity applications - Tools with layout controls, notifications, and quick actions
API Reference
Navbar14
Prop | Type | Default | Description |
---|---|---|---|
searchPlaceholder | string | "Search..." | Placeholder text for the search input |
searchValue | string | undefined | Controlled search input value |
testMode | boolean | undefined | Controlled test mode state |
showTestMode | boolean | true | Whether to show the test mode toggle |
notifications | Notification[] | defaultNotifications | Array of notification objects |
onSearchChange | (value: string) => void | undefined | Callback for search input changes |
onTestModeChange | (enabled: boolean) => void | undefined | Callback for test mode toggle |
onLayoutClick | () => void | undefined | Callback for layout button clicks |
onAddClick | () => void | undefined | Callback for add button clicks |
onInfoItemClick | (item: string) => void | undefined | Callback for info menu item clicks |
onNotificationClick | (notificationId: string) => void | undefined | Callback for notification clicks |
onSettingsItemClick | (item: string) => void | undefined | Callback for settings menu item clicks |
Search Features
- Icon Integration - Search icon positioned inside input field for clear visual hierarchy
- Responsive Width - Search input with max-width constraint for optimal layout
- Controlled State - Support for both controlled and uncontrolled search value
- Accessible Labels - Proper labeling and placeholder text for screen readers
Test Mode Toggle
- Labeled Switch - Clear "Test mode" label with compact switch component
- State Management - Support for controlled and uncontrolled toggle state
- Mobile Hidden - Test mode toggle hidden on mobile devices to save space
- Callback Support - Change handler for integration with application state
Menu System
- Info Menu - Help, documentation, tutorials, feedback, and about options
- Notification Menu - Rich notification display with unread indicators and timestamps
- Settings Menu - Preferences, appearance, privacy, integrations, API keys, and billing
- Consistent Styling - All menus use rounded-full buttons with muted foreground colors
Implementation Notes
- Uses shadcn/ui Input component with absolute positioned search icon
- Test mode switch supports both controlled and uncontrolled usage patterns
- All menu components are modular and can be used independently
- Notification system includes visual unread indicators with destructive badge variant
- Search input includes proper peer styling for icon positioning
- Compatible with shadcn/ui design system and Tailwind CSS styling framework
- Layout button provides access to view and layout configuration options
- Add button uses prominent rounded design to emphasize primary action functionality
AI Model Selector Navigation Bar
AI-focused navigation bar with model selector dropdown, temporary chat functionality, and user management. Features comprehensive model selection with descriptions and quick access to chat features for AI applications.
Breadcrumb and Filters Navigation Bar
Reports-focused navigation bar with breadcrumb navigation, date picker, advanced filters, and bookmark functionality. Features hierarchical navigation, date selection, multi-group filtering, and saved items management for analytics dashboards.