Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Modern Login Forms

Created by Aigars Silkalns for Colorlib

A curated collection of beautiful, responsive login form templates built with pure HTML, CSS, and JavaScript. Each form is designed to be completely self-contained and copy-paste ready for use in any project.

🌟 About Colorlib

Looking for more amazing form designs? Check out Colorlib's extensive collections:

πŸš€ Features

  • Pure HTML/CSS/JS β€” no frameworks, no build step, no package manager
  • Copy-paste ready β€” drop a single forms/<name>/ folder into any project
  • Shared LoginFormBase class β€” every form inherits validation, lifecycle, and accessibility behavior from one place; per-form scripts average ~50 lines
  • Responsive β€” mobile-first across all 20 designs
  • Accessible by default β€” :focus-visible keyboard rings, prefers-reduced-motion honored globally, ARIA on icon controls, semantic markup
  • SEO + social ready β€” meta description, Open Graph, Twitter card, and SVG favicon on every form
  • No external dependencies β€” works fully offline, no CDN, no Google Fonts
  • Cross-browser β€” Chrome 88+, Firefox 103+, Safari 15.4+, Edge 88+

πŸ–ΌοΈ Form Gallery

Complete Collection - 19 Unique Login Forms

Glassmorphism
Glassmorphism
Frosted glass effects
Live Demo | Source
Neon Minimalist
Neon Minimalist
Dark theme with neon
Live Demo | Source
Gradient Wave
Gradient Wave
Animated gradients
Live Demo | Source
Neumorphism
Neumorphism
Soft UI design
Live Demo | Source
Corporate
Corporate Professional
Enterprise-grade
Live Demo | Source
Material Design
Material Design
Google's Material UI
Live Demo | Source
Basic Form
Basic Form
Clean & simple
Live Demo | Source
Minimal Clean
Minimal Clean
Ultra-minimal design
Live Demo | Source
Creative Portal
Creative Portal
Interactive animations
Live Demo | Source
Eco Wellness
Eco Wellness
Nature-inspired
Live Demo | Source
AI Assistant
AI Assistant
Neural network theme
Live Demo | Source
Neon Cyber
Neon Cyber
Cyberpunk aesthetic
Live Demo | Source
Soft Minimalism
Soft Minimalism
Warm & organic
Live Demo | Source
Retro Future
Retro Future
Y2K revival style
Live Demo | Source
Minimal Music
Minimal Music
Spotify-inspired
Live Demo | Source
Travel Booking
Travel Booking
Travel industry theme
Live Demo | Source
Clean Banking
Clean Banking
Fintech design
Live Demo | Source
Modern SaaS
Modern SaaS
Stripe-inspired
Live Demo | Source
Elegant Portfolio
Elegant Portfolio
Creative professional
Live Demo | Source
Brutalist
Brutalist
Bold & minimal
Live Demo | Source

πŸ“‚ Forms by Category

🎨 Modern & Stylish

πŸ’Ό Corporate & Clean

🎯 Minimal & Simple

🎨 Creative & Artistic

🌟 Themed & Unique

πŸ› οΈ Quick Start

1. Browse & Choose

Open index.html in your browser to see all forms in action with live previews.

2. Copy Form Files

Each form is self-contained in its own directory:

forms/[form-name]/
β”œβ”€β”€ index.html    # Form HTML structure
β”œβ”€β”€ style.css     # Complete styling
β”œβ”€β”€ script.js     # Form functionality
└── README.md     # Documentation

3. Include the shared utilities

Copy shared/js/form-utils.js alongside your form folder. It provides:

  • FormUtils.LoginFormBase β€” the form lifecycle base class every form extends
  • FormUtils.validateEmail / validatePassword β€” drop-in validators
  • FormUtils.showNotification β€” XSS-safe toast (uses textContent, not innerHTML)
  • FormUtils.setupFloatingLabels / setupPasswordToggle β€” common UI helpers

4. Customize

  • Modify colors and styling in style.css
  • Adjust the base class options in script.js (form-group selector, validators, elements to hide on success, etc.) β€” see any per-form script.js for examples (most are 30–80 lines)
  • Update text and labels in index.html

Demo credentials

The included simulateLogin always succeeds except for one specific combination, used to demonstrate error states:

  • email: admin@demo.com
  • password: wrongpassword

πŸ“ Project Structure

login-forms/
β”œβ”€β”€ index.html                  # Main showcase page (gallery)
β”œβ”€β”€ CHANGELOG.md                # Project history
β”œβ”€β”€ shared/
β”‚   └── js/
β”‚       └── form-utils.js      # FormUtils helpers + LoginFormBase class
β”œβ”€β”€ forms/                     # 20 self-contained form templates
β”‚   β”œβ”€β”€ glassmorphism/
β”‚   β”œβ”€β”€ neon/
β”‚   β”œβ”€β”€ minimal/
β”‚   └── ... (20 forms total)
β”œβ”€β”€ assets/
β”‚   └── screenshots/           # 1400px-wide PNG previews
└── docs/
    β”œβ”€β”€ design-guide.md
    └── screenshot-integration-guide.md

🎯 Form Features

Each form includes:

  • βœ… Email and password inputs with validation
  • βœ… Floating label animations
  • βœ… Password visibility toggle
  • βœ… Real-time validation feedback
  • βœ… Loading and success states
  • βœ… Responsive mobile-first design
  • βœ… ARIA labels on icon controls + visible keyboard focus rings
  • βœ… Honors prefers-reduced-motion
  • βœ… Meta description, Open Graph image, Twitter card, and SVG favicon
  • βœ… Remember me checkbox, forgot password and sign up links

πŸ› Architecture

Every form is backed by FormUtils.LoginFormBase (in shared/js/form-utils.js). The base class owns the lifecycle:

class GlassmorphismLoginForm extends FormUtils.LoginFormBase {
    constructor() {
        super({
            hideOnSuccess: ['.divider', '.social-login', '.signup-link'],
            // optional: validators, formGroupSelector, cardSelector,
            // submitButtonSelector
        });
    }

    decorate() {
        // form-specific entrance animations or visual flourishes go here
    }
}

What the base class handles for you:

  • form submit, validation, and field-level error display
  • floating labels, password toggle, success state and reset
  • forgot-password, sign-up, and social-login link defaults
  • form-scoped keyboard shortcuts (no document-level leaks)
  • shake/animation cleanup via animationend (no setTimeout races)

What you override per form:

  • decorate() for entrance effects, particles, parallax, glitch, etc.
  • onSuccess() if your form needs a custom success transition
  • constructor options for selectors and validators that differ from the defaults

Per-form scripts ended up between 14 and 115 lines β€” down from 105 to 542 lines before the refactor.

🎨 Customization Guide

Colors & Theming

Each form uses CSS variables or inline styles that can be easily modified:

  • Primary colors
  • Background gradients
  • Text colors
  • Border styles

Form Validation

Validation rules in shared/js/form-utils.js:

  • Email format validation
  • Password strength requirements
  • Custom error messages
  • Success confirmations

Animations

  • Entrance animations
  • Hover effects
  • Focus transitions
  • Success celebrations

πŸ”§ Technical Details

Browser Support

Browser Version
Chrome 88+
Firefox 103+
Safari 15.4+
Edge 88+

Performance

  • No external runtime dependencies β€” no CDN, no Google Fonts, no npm
  • Screenshots stored at 1400px PNG (down from 3144px originals β€” 28 MB β†’ 8.9 MB total)
  • Lazy-loading on gallery images
  • ~1,400 lines of JavaScript across all 20 forms (down from ~5,600 before the base-class refactor)

Accessibility

  • Visible keyboard focus rings via :focus-visible (mouse users unaffected)
  • Honors prefers-reduced-motion: reduce globally β€” animations collapse to ~0ms
  • Semantic HTML, ARIA labels on icon-only controls, role="alert" / role="status" on toasts
  • Form-scoped keyboard handlers (no document-level listener leaks)
  • All inputs have autocomplete hints (email, current-password)

Security

  • FormUtils.showNotification uses textContent instead of innerHTML β€” error messages from the auth backend cannot inject HTML
  • No eval, no new Function, no inline event handlers anywhere

🀝 Contributing

We welcome contributions! Feel free to:

  • Submit bug reports and feature requests
  • Create new form designs following our guidelines
  • Improve existing forms and documentation
  • Share your customizations and use cases

πŸ“ License

This project is created by Aigars Silkalns for Colorlib.

πŸ“œ Changelog

See CHANGELOG.md for a full history of releases β€” including the 2.0 refactor that introduced the shared LoginFormBase class, accessibility improvements, security fixes, and an 80%+ reduction in per-form JavaScript.

πŸ“ž Support & Resources


Built with ❀️ by Aigars Silkalns for Colorlib

About

Modern open source login forms with clean HTM, CSS, JS and no dependencies

Topics

Resources

Stars

59 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages