Admin Login Templates
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Admin Portal | Luxe Dashboard</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap" rel="stylesheet"> </head> <body> <!-- Background Elements --> <div class="background-elements"> <div class="floating-shape shape-1"></div> <div class="floating-shape shape-2"></div> <div class="floating-shape shape-3"></div> <div class="particles" id="particles"></div> </div> <!-- Login Container --> <div class="login-container"> <!-- Header --> <div class="login-header"> <h2 class="header-title">Secure Login Portal</h2> <p class="header-subtitle">Access your premium admin dashboard</p> </div> <!-- Login Form --> <form id="loginForm"> <div class="form-group"> <label class="form-label">Email Address</label> <div class="input-container"> <i class="fas fa-envelope input-icon"></i> <input type="email" class="form-input" id="email" placeholder="admin@luxe.example.com" required> </div> </div> <div class="form-group"> <label class="form-label">Password</label> <div class="input-container"> <i class="fas fa-lock input-icon"></i> <input type="password" class="form-input" id="password" placeholder="••••••••••" required> <button type="button" class="password-toggle" id="togglePassword"> <i class="fas fa-eye"></i> </button> </div> </div> <div class="form-options"> <label class="checkbox-container"> <input type="checkbox" id="remember"> <span class="checkmark"></span> Remember me </label> <a href="#" class="forgot-password">Forgot Password?</a> </div> <button type="submit" class="login-button" id="loginButton"> <i class="fas fa-sign-in-alt button-icon"></i> SIGN IN TO DASHBOARD </button> </form> <!-- Footer --> <div class="login-footer"> <p>© 2023 Luxe Admin. All rights reserved.</p> <div class="footer-links"> <a href="#" class="footer-link">Privacy Policy</a> <a href="#" class="footer-link">Terms of Service</a> <a href="#" class="footer-link">Support Center</a> </div> </div> </div> <!-- Success/Error Messages --> <div class="success-message" id="successMessage"> <i class="fas fa-check-circle message-icon"></i> <div class="message-content"> <h4>Login Successful!</h4> <p>Redirecting to admin dashboard...</p> </div> </div> <div class="error-message" id="errorMessage"> <i class="fas fa-exclamation-circle message-icon"></i> <div class="message-content"> <h4>Authentication Failed</h4> <p>Please check your credentials and try again.</p> </div> </div> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', sans-serif; min-height: 100vh; background: linear-gradient(135deg, #0c0c0c, #1a1a2e, #16213e); display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; color: #fff; } /* Animated Background Elements */ .background-elements { position: absolute; width: 100%; height: 100%; z-index: 1; overflow: hidden; } .floating-shape { position: absolute; border-radius: 50%; background: linear-gradient(45deg, rgba(255, 105, 180, 0.15), rgba(0, 191, 255, 0.15)); filter: blur(40px); animation: float 20s infinite linear; } .shape-1 { width: 400px; height: 400px; top: -150px; left: -100px; animation-delay: 0s; } .shape-2 { width: 300px; height: 300px; bottom: -100px; right: -50px; background: linear-gradient(45deg, rgba(147, 51, 234, 0.15), rgba(59, 130, 246, 0.15)); animation-delay: -5s; animation-direction: reverse; } .shape-3 { width: 250px; height: 250px; top: 50%; right: 10%; background: linear-gradient(45deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1)); animation-delay: -10s; } @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(30px, 50px) rotate(90deg); } 50% { transform: translate(0, 100px) rotate(180deg); } 75% { transform: translate(-30px, 50px) rotate(270deg); } 100% { transform: translate(0, 0) rotate(360deg); } } /* Glowing Particles */ .particles { position: absolute; width: 100%; height: 100%; z-index: 1; } .particle { position: absolute; width: 4px; height: 4px; background: rgba(255, 255, 255, 0.6); border-radius: 50%; box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.3); animation: particleFloat 15s infinite linear; } @keyframes particleFloat { 0% { transform: translateY(100vh) translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100px) translateX(100px); opacity: 0; } } /* Main Container */ .login-container { position: relative; z-index: 10; width: 95%; max-width: 420px; padding: 40px; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px); border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden; transform-style: preserve-3d; perspective: 1000px; animation: containerEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes containerEntrance { 0% { opacity: 0; transform: translateY(50px) rotateX(-10deg); } 100% { opacity: 1; transform: translateY(0) rotateX(0); } } /* Header Section */ .login-header { text-align: center; margin-bottom: 40px; position: relative; } .logo { display: flex; align-items: center; justify-content: center; margin-bottom: 25px; position: relative; } .logo-icon { width: 70px; height: 70px; background: linear-gradient(135deg, #8a2be2, #4169e1); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 30px; margin-right: 15px; box-shadow: 0 10px 25px rgba(138, 43, 226, 0.4); position: relative; overflow: hidden; } .logo-icon::after { content: ''; position: absolute; width: 100%; height: 100%; background: linear-gradient(transparent, rgba(255, 255, 255, 0.2)); top: 0; left: 0; } .logo-text { font-family: 'Playfair Display', serif; } .logo-text h1 { font-size: 28px; font-weight: 600; background: linear-gradient(45deg, #fff, #e0e0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px; } .logo-text p { font-size: 13px; color: rgba(255, 255, 255, 0.7); letter-spacing: 2px; margin-top: 5px; } .header-title { font-size: 24px; font-weight: 600; margin-bottom: 10px; background: linear-gradient(45deg, #fff, #b3b3ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .header-subtitle { color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 300; } /* Form Styles */ .form-group { margin-bottom: 25px; position: relative; } .form-label { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.9); font-size: 14px; font-weight: 500; letter-spacing: 0.5px; } .input-container { position: relative; transition: all 0.3s ease; } .input-container:hover { transform: translateY(-2px); } .input-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.6); font-size: 18px; z-index: 2; transition: color 0.3s; } .form-input { width: 100%; padding: 18px 18px 18px 55px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; color: white; font-size: 16px; font-weight: 400; transition: all 0.3s ease; backdrop-filter: blur(5px); } .form-input::placeholder { color: rgba(255, 255, 255, 0.4); } .form-input:focus { outline: none; border-color: rgba(138, 43, 226, 0.6); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2); } .form-input:focus + .input-icon { color: #8a2be2; } .password-toggle { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: rgba(255, 255, 255, 0.6); font-size: 18px; cursor: pointer; transition: color 0.3s; } .password-toggle:hover { color: #8a2be2; } /* Remember Me & Forgot Password */ .form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; font-size: 14px; } .checkbox-container { display: flex; align-items: center; position: relative; cursor: pointer; user-select: none; } .checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkmark { width: 20px; height: 20px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 5px; margin-right: 10px; position: relative; transition: all 0.3s; } .checkbox-container input:checked ~ .checkmark { background: linear-gradient(135deg, #8a2be2, #4169e1); border-color: transparent; } .checkmark:after { content: ""; position: absolute; display: none; left: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .checkbox-container input:checked ~ .checkmark:after { display: block; } .forgot-password { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: all 0.3s; position: relative; padding-bottom: 2px; } .forgot-password::after { content: ''; position: absolute; width: 0; height: 1px; bottom: 0; left: 0; background: linear-gradient(90deg, #8a2be2, #4169e1); transition: width 0.3s; } .forgot-password:hover { color: white; } .forgot-password:hover::after { width: 100%; } /* Login Button */ .login-button { width: 100%; padding: 18px; background: linear-gradient(135deg, #8a2be2, #4169e1); border: none; border-radius: 14px; color: white; font-size: 16px; font-weight: 600; letter-spacing: 1px; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; overflow: hidden; z-index: 1; box-shadow: 0 10px 25px rgba(138, 43, 226, 0.3); } .login-button:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4); letter-spacing: 1.5px; } .login-button:active { transform: translateY(-2px); } .login-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.7s; z-index: -1; } .login-button:hover::before { left: 100%; } .button-icon { margin-right: 10px; font-size: 18px; } /* Footer */ .login-footer { text-align: center; margin-top: 30px; padding-top: 25px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); font-size: 13px; } .footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 15px; } .footer-link { color: rgba(255, 255, 255, 0.6); text-decoration: none; font-size: 12px; transition: color 0.3s; } .footer-link:hover { color: #8a2be2; } /* Responsive Design */ @media (max-width: 480px) { .login-container { padding: 30px 25px; width: 90%; } .logo { flex-direction: column; text-align: center; } .logo-icon { margin-right: 0; margin-bottom: 15px; } .form-options { flex-direction: column; align-items: flex-start; gap: 15px; } .forgot-password { align-self: flex-end; } } /* Success/Error States */ .success-message, .error-message { position: fixed; top: 20px; right: 20px; padding: 15px 25px; border-radius: 12px; backdrop-filter: blur(10px); z-index: 100; transform: translateX(120%); transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); display: flex; align-items: center; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); max-width: 350px; } .success-message { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; } .error-message { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; } .message-icon { font-size: 20px; margin-right: 10px; } .message-content h4 { font-size: 16px; margin-bottom: 3px; } .message-content p { font-size: 13px; opacity: 0.9; }
JavaScript
document.addEventListener('DOMContentLoaded', function() { // Create animated particles const particlesContainer = document.getElementById('particles'); for (let i = 0; i < 50; i++) { const particle = document.createElement('div'); particle.className = 'particle'; particle.style.left = Math.random() * 100 + '%'; particle.style.animationDelay = Math.random() * 15 + 's'; particle.style.width = Math.random() * 4 + 2 + 'px'; particle.style.height = particle.style.width; particlesContainer.appendChild(particle); } // Toggle password visibility const togglePassword = document.getElementById('togglePassword'); const passwordInput = document.getElementById('password'); const eyeIcon = togglePassword.querySelector('i'); togglePassword.addEventListener('click', function() { const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password'; passwordInput.setAttribute('type', type); eyeIcon.classList.toggle('fa-eye'); eyeIcon.classList.toggle('fa-eye-slash'); }); // Form submission with enhanced animations const loginForm = document.getElementById('loginForm'); const loginButton = document.getElementById('loginButton'); const successMessage = document.getElementById('successMessage'); const errorMessage = document.getElementById('errorMessage'); loginForm.addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('email').value; const password = document.getElementById('password').value; const remember = document.getElementById('remember').checked; // Original button content const originalButtonHTML = loginButton.innerHTML; // Show loading state loginButton.innerHTML = '<i class="fas fa-spinner fa-spin button-icon"></i> AUTHENTICATING...'; loginButton.disabled = true; // Simulate API call with realistic delay setTimeout(() => { // For demo purposes - accept any non-empty credentials if (email && password) { // Success animation loginButton.innerHTML = '<i class="fas fa-check button-icon"></i> ACCESS GRANTED'; loginButton.style.background = 'linear-gradient(135deg, #10b981, #34d399)'; // Show success message successMessage.style.transform = 'translateX(0)'; // In a real app, redirect to dashboard setTimeout(() => { // Simulate redirect successMessage.style.transform = 'translateX(120%)'; loginButton.innerHTML = originalButtonHTML; loginButton.disabled = false; loginButton.style.background = 'linear-gradient(135deg, #8a2be2, #4169e1)'; // Show a demo alert alert(`Welcome back, ${email.split('@')[0]}!\n\nDashboard access granted.\nRemember me: ${remember ? 'Enabled' : 'Disabled'}`); }, 2000); } else { // Error animation loginButton.innerHTML = '<i class="fas fa-times button-icon"></i> ACCESS DENIED'; loginButton.style.background = 'linear-gradient(135deg, #ef4444, #f87171)'; // Show error message errorMessage.style.transform = 'translateX(0)'; setTimeout(() => { errorMessage.style.transform = 'translateX(120%)'; loginButton.innerHTML = originalButtonHTML; loginButton.disabled = false; loginButton.style.background = 'linear-gradient(135deg, #8a2be2, #4169e1)'; }, 3000); } }, 2000); }); // Add hover effect to form inputs const formInputs = document.querySelectorAll('.form-input'); formInputs.forEach(input => { input.addEventListener('focus', function() { this.parentElement.style.transform = 'translateY(-4px)'; }); input.addEventListener('blur', function() { this.parentElement.style.transform = 'translateY(0)'; }); }); // Add floating effect to container on mousemove const container = document.querySelector('.login-container'); document.addEventListener('mousemove', (e) => { const xAxis = (window.innerWidth / 2 - e.pageX) / 25; const yAxis = (window.innerHeight / 2 - e.pageY) / 25; container.style.transform = `rotateY(${xAxis}deg) rotateX(${yAxis}deg)`; }); // Reset container transform when mouse leaves document.addEventListener('mouseleave', () => { container.style.transform = 'rotateY(0deg) rotateX(0deg)'; }); });
Output Preview
Desktop
Mobile
Fullscreen