Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tailwind CSS Minimalist Icon Navbar</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-indigo-50 flex items-center justify-center h-screen"> <nav class="bg-white/80 backdrop-blur-md px-2 py-2 rounded-2xl shadow-xl border border-white flex items-center space-x-1" x-data="{ active: 'home' }"> <button @click="active = 'home'" :class="active === 'home' ? 'bg-indigo-600 text-white' : 'text-indigo-400 hover:bg-indigo-50'" class="p-3 rounded-xl transition-all duration-300"> <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /> </svg> </button> <button @click="active = 'search'" :class="active === 'search' ? 'bg-indigo-600 text-white' : 'text-indigo-400 hover:bg-indigo-50'" class="p-3 rounded-xl transition-all duration-300"> <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <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> </button> <div class="w-px h-6 bg-indigo-100 mx-2"></div> <button @click="active = 'notif'" :class="active === 'notif' ? 'bg-indigo-600 text-white' : 'text-indigo-400 hover:bg-indigo-50'" class="p-3 rounded-xl transition-all duration-300"> <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <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> <button @click="active = 'user'" :class="active === 'user' ? 'bg-indigo-600 text-white' : 'text-indigo-400 hover:bg-indigo-50'" class="p-3 rounded-xl transition-all duration-300"> <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" /> </svg> </button> </nav> <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script> </body> </html>