Navbar
Underline Navigation Bar
Modern navigation bar with elegant underline hover effects and clean design. Features responsive mobile menu, smooth transitions, and TypeScript support for React applications.
Powered by
Installation
npx shadcn@latest add https://www.shadcn.io/registry/navbar-03.json
npx shadcn@latest add https://www.shadcn.io/registry/navbar-03.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/navbar-03.json
bunx shadcn@latest add https://www.shadcn.io/registry/navbar-03.json
Features
- Elegant underline effects with smooth scale animations on hover and active states
- Clean minimal design with optimal spacing and typography using shadcn/ui components
- Container-based responsive design with automatic mobile/desktop switching based on actual width
- TypeScript support with comprehensive interface definitions and type-safe props
- Customizable navigation structure with flexible menu configuration and active state management
- shadcn/ui integration using design tokens and consistent styling patterns
Use Cases
This free open source React component works well for:
- Modern web applications - Clean navigation systems built with Next.js and TypeScript
- Portfolio websites - Professional navigation with subtle hover animations using Tailwind CSS
- Landing pages - Minimalist navigation that doesn't distract from content
- Corporate websites - Professional appearance with smooth interactive elements
API Reference
Navbar03
Prop | Type | Default | Description |
---|---|---|---|
logo | React.ReactNode | <Logo /> | Logo component to display in the navbar |
logoHref | string | "#" | URL for logo click navigation |
navigationLinks | Navbar03NavItem[] | defaultNavigationLinks | Array of navigation menu items with active state support |
signInText | string | "Sign In" | Text for the sign-in button |
ctaText | string | "Get Started" | Text for the call-to-action button |
onSignInClick | () => void | undefined | Callback function for sign-in button clicks |
onCtaClick | () => void | undefined | Callback function for CTA button clicks |
Navigation Item Structure
- Simple Links - Basic navigation items with href, label, and optional active state
- Active State Management - Automatic highlighting with underline animation for current page
- Hover Effects - Smooth scale-based underline animations on menu item hover
- Mobile Optimization - Responsive menu with consistent styling across devices
Implementation Notes
- Uses ResizeObserver for container-based responsive behavior independent of viewport
- Supports keyboard navigation and accessibility standards through Radix UI components
- Mobile menu automatically appears when container width is less than 768px
- All navigation items are non-functional for demonstration purposes with pointer cursor
- Compatible with shadcn/ui design system and Tailwind CSS styling framework
- Features smooth CSS transform animations with optimized performance
Advanced Navigation Bar
Sophisticated navigation bar with dropdown submenus, multiple layout types, and mobile responsive design. Perfect for React applications requiring rich navigation with Next.js integration and TypeScript support.
E-commerce Navigation Bar
Feature-rich e-commerce navigation bar with integrated search functionality, shopping cart counter, and mobile-responsive design. Perfect for online stores and marketplace applications built with React and TypeScript.