Logo hdtoledo
hdtoledo.dev
Módulos_del_Sistema
MÓDULO_TEÓRICO

Futuristic Login with Glassmorphism

Glassmorphism Login

Building the First Project Screen

It is time to build the Login Screen for our Quantum Portal. We will apply the most sought-after visual effect in modern UI: Glassmorphism (Frosted Glass) with subtle neon rim reflections.


1. Absolute Centering in a Single Line

Forget calculating relative offsets. In Tailwind, centering a card vertically and horizontally across the entire screen is effortless:

html
<div class="min-h-screen bg-slate-950 flex items-center justify-center p-4"> <!-- Login Card lives here --> </div>

2. The Glass Card Component

Combining backdrop-blur, semi-transparent backgrounds, and glowing border rings:

html
<div class="w-full max-w-md bg-slate-900/70 backdrop-blur-xl border border-cyan-500/30 rounded-2xl p-8 shadow-2xl shadow-cyan-950/50"> <!-- Form Header --> <div class="text-center mb-8"> <div class="inline-flex items-center justify-center w-12 h-12 rounded-xl bg-cyan-500/10 border border-cyan-500/30 text-cyan-400 mb-3"> ⚡ </div> <h2 class="text-2xl font-bold text-white tracking-tight">Quantum Access</h2> <p class="text-sm text-slate-400 mt-1">Enter your agent credentials</p> </div> <!-- Form --> <form class="space-y-5"> <!-- Email Field --> <div> <label class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2"> Email Address </label> <input type="email" placeholder="agent@quantum.io" class="w-full bg-slate-950/80 border border-slate-700/80 rounded-xl px-4 py-3 text-white placeholder-slate-500 text-sm focus:outline-none focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/20 transition-all duration-200" > </div> <!-- Password Field --> <div> <div class="flex justify-between items-center mb-2"> <label class="text-xs font-semibold text-slate-300 uppercase tracking-wider"> Password </label> <a href="#" class="text-xs text-cyan-400 hover:text-cyan-300 transition-colors">Forgot password?</a> </div> <input type="password" placeholder="••••••••••••" class="w-full bg-slate-950/80 border border-slate-700/80 rounded-xl px-4 py-3 text-white placeholder-slate-500 text-sm focus:outline-none focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/20 transition-all duration-200" > </div> <!-- Neon Submit Button --> <button type="submit" class="w-full bg-cyan-400 hover:bg-cyan-300 text-slate-950 font-bold py-3.5 px-4 rounded-xl shadow-lg shadow-cyan-400/20 hover:shadow-cyan-400/40 hover:-translate-y-0.5 active:translate-y-0 transition-all duration-200" > Authenticate </button> </form> </div>

💡 Notice space-y-5

Instead of manually adding bottom margins to every input, the parent utility class space-y-5 automatically injects uniform vertical rhythm between all child elements. Pure velocity!