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 Mini Sidebar Navigation</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-indigo-50 flex h-screen overflow-hidden"> <!-- Mini Sidebar --> <aside class="w-20 bg-slate-900 flex flex-col items-center py-6 border-r border-white/5 relative z-50 transition-all duration-300"> <!-- Brand Icon --> <div class="mb-10 flex flex-col items-center"> <div class="h-10 w-10 bg-indigo-500 rounded-2xl flex items-center justify-center text-white font-black text-xs shadow-lg shadow-indigo-500/20 rotate-45 select-none transition-transform hover:rotate-90">M</div> </div> <!-- Main Navigation Icons --> <nav class="flex-1 space-y-4 px-3 w-full"> <a href="##" class="w-full flex justify-center py-4 rounded-2xl bg-indigo-600/20 text-indigo-400 border border-indigo-600/30 transition shadow-inner"> <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> </a> <a href="##" class="w-full flex justify-center py-4 rounded-2xl text-slate-500 hover:text-white hover:bg-white/5 transition border border-transparent"> <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="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg> </a> <a href="##" class="w-full flex justify-center py-4 rounded-2xl text-slate-500 hover:text-white hover:bg-white/5 transition border border-transparent"> <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="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" /></svg> </a> <a href="##" class="w-full flex justify-center py-4 rounded-2xl text-slate-500 hover:text-white hover:bg-white/5 transition border border-transparent"> <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="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg> </a> </nav> <!-- Bottom Action Icons --> <div class="space-y-4 px-3 mt-auto w-full"> <button class="w-full h-12 flex justify-center items-center rounded-2xl bg-white/5 text-slate-500 hover:text-white border border-transparent hover:border-slate-700 transition"> <svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" /></svg> </button> </div> </aside> <!-- Content with mini sidebar --> <main class="flex-1 p-16 overflow-y-auto"> <div class="h-full bg-white rounded-3xl border border-indigo-100 shadow-2xl p-16 text-center flex flex-col items-center justify-center"> <h1 class="text-3xl font-black text-slate-800 mb-4 tracking-tighter italic">MAXIMIZED SPACE.</h1> <p class="text-slate-500 max-w-sm font-bold uppercase tracking-widest text-[11px] leading-relaxed">The icon-only sidebar is popular for productivity apps to maximize the primary canvas area without sacrificing immediate access to core functions.</p> </div> </main> </body> </html>