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 Floating Label Input</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"> <div class="w-full max-w-sm"> <div class="relative h-20 bg-white rounded-3xl border-2 border-slate-100 group focus-within:border-indigo-600 transition-all overflow-hidden"> <input type="text" id="floating_input" name="floating_input" placeholder=" " class="peer w-full h-full pt-8 pb-2 px-8 font-black text-slate-900 focus:outline-none placeholder-transparent" > <label for="floating_input" class="absolute left-8 top-1/2 -translate-y-1/2 text-[10px] font-black text-slate-300 uppercase tracking-widest transition-all peer-placeholder-shown:text-sm peer-placeholder-shown:font-bold peer-placeholder-shown:text-slate-400 peer-focus:top-6 peer-focus:text-[10px] peer-focus:font-black peer-focus:text-indigo-600 peer-[:not(:placeholder-shown)]:top-6 peer-[:not(:placeholder-shown)]:text-[10px] peer-[:not(:placeholder-shown)]:font-black peer-[:not(:placeholder-shown)]:text-indigo-600" > Neural Identity </label> </div> </div> </body> </html>