Animated Login Form
Modern login form with smooth animations, validation, and social login options, perfect for user authentication.
Responsive Design
Yes
Dark Mode Support
No
lines
629
Browser Compatibility
Chrome Β· Firefox Β· Safari Β· Edge
Live Preview
Interact with the component without leaving the page.
Overview
Modern login form with smooth animations, validation, and social login options, perfect for user authentication.
How to use
- Copy the HTML markup into your page.
- Paste the CSS into your stylesheet and ensure the selectors match your markup.
- Paste the JavaScript and load it after the markup.
- Adjust spacing, colors, and text to match your design system.
Customization tips
- Rename class names to avoid collisions with your existing CSS.
- Replace hard-coded colors with CSS variables for theming.
- Verify the layout at 320px, 768px, and 1024px widths.
HTML
66
lines
CSS
408
lines
JavaScript
155
lines
<div class="login-form-container">
<div class="login-form-demo">
<div class="form-wrapper">
<div class="form-header">
<h2>Welcome Back</h2>
<p>Sign in to your account</p>
</div>
<form class="login-form" id="loginForm">
<div class="form-group">
<label for="email">Email Address</label>
<div class="input-wrapper">
<input type="email" id="email" name="email" required placeholder="Enter your email">
<div class="input-icon">βοΈ</div>
</div>
</div>
<div class="form-group">
<label for="password">Password</label>
<div class="input-wrapper">
<input type="password" id="password" name="password" required placeholder="Enter your password">
<div class="input-icon">π</div>
<button type="button" class="toggle-password" id="togglePassword">ποΈ</button>
</div>
</div>
<div class="form-options">
<label class="checkbox-label">
<input type="checkbox" id="rememberMe" name="rememberMe">
<span class="checkmark"></span>
Remember me
</label>
<a href="#" class="forgot-password">Forgot password?</a>
</div>
<button type="submit" class="btn btn-primary" id="loginBtn">
<span class="btn-text">Sign In</span>
<span class="btn-spinner" id="loginSpinner"></span>
</button>
<div class="divider">
<span>or continue with</span>
</div>
<div class="social-login">
<button type="button" class="social-btn google">
<span class="social-icon">G</span>
<span class="social-text">Google</span>
</button>
<button type="button" class="social-btn facebook">
<span class="social-icon">f</span>
<span class="social-text">Facebook</span>
</button>
<button type="button" class="social-btn apple">
<span class="social-icon">π</span>
<span class="social-text">Apple</span>
</button>
</div>
<div class="signup-link">
Don't have an account? <a href="#">Sign up</a>
</div>
</form>
</div>
</div>
</div>
Browser Compatibility
Chrome
>= 50
Firefox
>= 45
Safari
>= 10
Edge
>= 15