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 Drawer Panel</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 min-h-screen p-6 antialiased" x-data="{ open: true }"> <button @click="open = true" class="px-8 py-3 bg-slate-900 text-white rounded-2xl font-bold hover:bg-indigo-600 transition shadow-xl cursor-pointer">Explore Side Panel</button> <div x-show="open" class="fixed inset-0 z-50 overflow-hidden" style="display: none;" > <div class="absolute inset-0 overflow-hidden"> <!-- Backdrop --> <div x-show="open" x-transition:enter="ease-in-out duration-500" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in-out duration-500" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="absolute inset-0 bg-slate-900/40 backdrop-blur-sm transition-opacity" @click="open = false" ></div> <div class="fixed inset-y-0 right-0 pl-10 max-w-full flex"> <!-- Panel --> <div x-show="open" x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700" x-transition:enter-start="translate-x-full" x-transition:enter-end="translate-x-0" x-transition:leave="transform transition ease-in-out duration-500 sm:duration-700" x-transition:leave-start="translate-x-0" x-transition:leave-end="translate-x-full" class="w-screen max-w-md" > <div class="h-full flex flex-col bg-white shadow-3xl rounded-l-[3rem] overflow-hidden"> <div class="flex-1 py-12 px-10 overflow-y-auto"> <div class="flex items-start justify-between mb-12"> <div> <h2 class="text-2xl font-black text-slate-900 tracking-tighter italic">Terminal Drawer.</h2> <p class="text-[10px] font-black text-indigo-400 uppercase tracking-widest mt-2">Node Segment Configuration</p> </div> <button @click="open = false" class="h-12 w-12 bg-slate-50 text-slate-400 rounded-2xl flex items-center justify-center hover:bg-slate-100 hover:text-slate-600 transition cursor-pointer"> <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.5" d="M6 18L18 6M6 6l12 12"/></svg> </button> </div> <nav class="space-y-8"> <div class="space-y-3"> <h4 class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Core Metrics</h4> <div class="bg-slate-50 p-6 rounded-[2rem] border border-slate-100"> <div class="flex justify-between items-center mb-4"> <span class="text-xs font-bold text-slate-600">CPU LOAD</span> <span class="text-xs font-black text-indigo-600">12.4%</span> </div> <div class="h-2 bg-white rounded-full overflow-hidden"> <div class="h-full bg-indigo-600 w-[12.4%]"></div> </div> </div> </div> <div class="space-y-3"> <h4 class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Recent Activity</h4> <ul class="space-y-4"> <li class="flex gap-4 p-4 hover:bg-slate-50 rounded-2xl transition-colors cursor-pointer group"> <div class="h-8 w-8 bg-indigo-50 text-indigo-600 rounded-lg flex items-center justify-center shrink-0 group-hover:bg-indigo-600 group-hover:text-white transition-colors"><svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg></div> <span class="text-xs font-bold text-slate-700 italic">Turbo sync enabled</span> </li> <li class="flex gap-4 p-4 hover:bg-slate-50 rounded-2xl transition-colors cursor-pointer group"> <div class="h-8 w-8 bg-rose-50 text-rose-600 rounded-lg flex items-center justify-center shrink-0 group-hover:bg-rose-600 group-hover:text-white transition-colors"><svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01"/></svg></div> <span class="text-xs font-bold text-slate-700 italic">Security log cleared</span> </li> </ul> </div> </nav> </div> <div class="shrink-0 px-10 py-10 bg-slate-50 border-t border-slate-100 flex gap-4"> <button @click="open = false" class="flex-1 h-14 bg-slate-900 text-white rounded-2xl font-bold text-xs uppercase tracking-widest hover:bg-slate-800 transition shadow-lg">Save Session</button> <button @click="open = false" class="px-8 h-14 bg-white text-slate-400 border border-slate-200 rounded-2xl font-bold text-xs uppercase tracking-widest hover:text-rose-600 transition">Reset</button> </div> </div> </div> </div> </div> </div> <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script> </body> </html>