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 Split Button</title> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.2.1"></script> </head> <body class="bg-gray-50 flex items-center justify-center min-h-screen" x-data="{ open: false }"> <div class="inline-flex rounded-2xl shadow-2xl shadow-slate-200 overflow-hidden relative"> <button class="px-8 h-14 bg-slate-900 text-white font-black text-xs uppercase tracking-widest hover:bg-indigo-600 border-r border-white/10 transition-colors cursor-pointer active:scale-95"> Deploy Solution </button> <button @click="open = !open" class="px-4 h-14 bg-slate-900 text-white hover:bg-indigo-600 transition-colors cursor-pointer active:scale-95" > <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.5" d="M19 9l-7 7-7-7" /> </svg> </button> <!-- Dropdown Menu --> <div x-show="open" @click.away="open = false" x-transition class="absolute top-16 right-0 w-48 bg-white rounded-2xl shadow-3xl border border-slate-100 p-2 z-10" style="display: none;" > <a href="##" class="block px-4 py-3 text-xs font-black text-slate-500 hover:bg-slate-50 hover:text-slate-900 rounded-xl transition-colors">Staging Build</a> <a href="##" class="block px-4 py-3 text-xs font-black text-slate-500 hover:bg-slate-50 hover:text-slate-900 rounded-xl transition-colors mt-1">Production Push</a> </div> </div> <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script> </body> </html>