Component
Glass Navbar
Elegant frosted glass effect navigation with backdrop blur. Perfect for creative platforms and modern landing pages.
- Component
- Tailwind
- HTML
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/navigation/glass-navbar/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Navigation/glass-navbar Tailwind/Components/Navigation/glass-navbar <nav class="sticky top-0 z-50 bg-white/60 backdrop-blur-xl border-b border-white/20">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Logo -->
<a href="#" class="flex items-center gap-3">
<div class="w-10 h-10 bg-gradient-to-br from-violet-500 via-fuchsia-500 to-pink-500 rounded-xl flex items-center justify-center shadow-xl shadow-violet-500/30">
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"/>
</svg>
</div>
<span class="text-gray-900 text-xl font-bold">Spark</span>
</a>
<!-- Desktop Navigation -->
<div class="hidden md:flex items-center gap-1">
<a href="#" class="px-4 py-2 text-gray-900 font-medium rounded-xl hover:bg-white/50 transition-colors">Home</a>
<a href="#" class="px-4 py-2 text-gray-600 hover:text-gray-900 hover:bg-white/50 rounded-xl transition-colors">Explore</a>
<a href="#" class="px-4 py-2 text-gray-600 hover:text-gray-900 hover:bg-white/50 rounded-xl transition-colors">Create</a>
<a href="#" class="px-4 py-2 text-gray-600 hover:text-gray-900 hover:bg-white/50 rounded-xl transition-colors">Marketplace</a>
</div>
<!-- Search & Actions -->
<div class="hidden md:flex items-center gap-4">
<div class="relative">
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
<input type="text" placeholder="Search..." class="w-64 pl-10 pr-4 py-2 bg-white/50 backdrop-blur-sm border border-white/20 rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-violet-500/50 focus:bg-white/80 transition-all">
</div>
<button class="p-2 text-gray-500 hover:text-gray-700 transition-colors" aria-label="Notifications">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"/>
</svg>
</button>
<div class="flex items-center gap-3 pl-4 border-l border-gray-200">
<div class="w-9 h-9 bg-gradient-to-br from-violet-400 to-fuchsia-400 rounded-full flex items-center justify-center">
<span class="text-white text-sm font-medium">AL</span>
</div>
</div>
</div>
<!-- Mobile Menu Button -->
<button class="md:hidden p-2 text-gray-600" aria-label="Menu">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
</svg>
</button>
</div>
</div>
<!-- Mobile Menu -->
<div class="md:hidden hidden bg-white/80 backdrop-blur-xl border-t border-white/20" id="mobile-menu">
<div class="px-4 py-4 space-y-4">
<div class="relative">
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
<input type="text" placeholder="Search..." class="w-full pl-10 pr-4 py-2 bg-white border border-white/20 rounded-full text-sm focus:outline-none">
</div>
<a href="#" class="block px-4 py-2 text-gray-900 font-medium rounded-lg hover:bg-white/50">Home</a>
<a href="#" class="block px-4 py-2 text-gray-600 rounded-lg hover:bg-white/50">Explore</a>
<a href="#" class="block px-4 py-2 text-gray-600 rounded-lg hover:bg-white/50">Create</a>
<a href="#" class="block px-4 py-2 text-gray-600 rounded-lg hover:bg-white/50">Marketplace</a>
</div>
</div>
</nav> # Glass Navbar
Glassmorphism navbar.
## Usage
```bash
npx devsnips add Tailwind/Components/Navigation/glass-navbar
```
Copy from `code.html`.
## File Structure
`code.html` · `preview.html` · `metadata.json` · `README.md` 66 lines UTF-8 · LF · Spaces: 2
Continue browsing