Skip to content

Signup Form with Password Requirements Checklist

Tailwind CSS signup form that ticks off password rules as you type, with a strength meter, show/hide toggle, inline validation and a simulated success state.

Also known as: register form password strength, password requirements checker, create account form, password strength meter form

Signup Form with Password Requirements Checklist live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A signup form built with Tailwind CSS and vanilla JavaScript that ticks off each password requirement as the user types, next to a five-step strength meter and a show/hide password toggle. The split layout pairs the form with a dark brand panel, making it a ready-made registration page for SaaS products, dashboards and member areas.

How it works

The root is .tsp-signup, which carries data-tsp-min="10" for the minimum password length. Inside a two-column card, the .tsp-brand panel (hidden on phones) shows the logo, a headline and three benefits over a CSS dot grid. The form (data-tsp-form, novalidate) contains name, email and password fields, the strength bars (data-tsp-bar), the requirements list #tsp-rules with one li per rule (data-tsp-rule="length", upper, lower, number, symbol) and a terms checkbox.

The script initializes every .tsp-signup on DOMContentLoaded. On each input event of the password field, checkPassword() runs one test per rule and toggles the .is-met class, which turns the empty circle into a filled check mark. The number of met rules becomes data-tsp-score on the root; CSS colors the active .tsp-bar elements red, amber, lime or green, and data-tsp-strength shows Weak, Fair, Good or Strong. The eye button (data-tsp-reveal) switches the field between password and text.

On submit the script validates every field, writes messages into the matching data-tsp-error elements, sets aria-invalid and focuses the first problem. Rules still missing turn red through .is-submitted. A valid form shows a spinner for 1.2 seconds, then the data-tsp-success panel with the entered email.

Customization

  • data-tsp-min on .tsp-signup: change the minimum length; the "At least 10 characters" label updates through data-tsp-min-label.
  • buildTests() in script.js: edit or add rules, then add an li with a matching data-tsp-rule value.
  • --tsp-weak, --tsp-fair, --tsp-good and --tsp-strong in style.css: the strength bar colors; --tsp-met colors fulfilled rules.
  • STRENGTH_LABELS in script.js: rename the strength levels or translate them.
  • bg-lime-400 on the submit button and bg-stone-900 on .tsp-brand: swap the Tailwind colors for your brand.
  • Remove the .tsp-brand panel and md:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] for a single-column form.
  • Replace the window.setTimeout in the submit handler with the fetch() call shown in the comment to post to your API.

Use cases

  • SaaS products: new users see each password rule tick off live next to a five-step strength meter
  • Dashboards and member areas: a split registration page pairs the form with a dark brand panel
  • Membership sites: inline validation and a terms checkbox guide visitors through account creation
  • Mobile signup flows: the show or hide toggle helps people type long passwords correctly on small screens

Accessibility

Every input has a visible label. The password field references the requirements list and its error through aria-describedby, and each rule includes hidden ", met" or ", not met" text. A polite live region announces "3 of 5 password requirements met" after the user pauses typing instead of on every keystroke. Errors use aria-invalid and focus moves to the first invalid field. The reveal button uses aria-pressed and a changing label, the success heading receives focus, and all controls have lime focus outlines. Transitions and the spinner stop under prefers-reduced-motion: reduce.

Signup Form with Password Requirements Checklist at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Login & Sign Up
License
Free for personal and commercial use

Questions about this template

Can I use the Signup Form with Password Requirements Checklist code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Signup Form with Password Requirements Checklist – Tailwind CSS login & sign up component screenshot
Signup Form with Password Requirements Checklist · Tailwind CSS Login & Sign Up

More Login & Sign Up

Login Form with Floating Labels – Pure CSS login & sign up preview

Login Form with Floating Labels

Clean pure CSS login card with animated floating labels, show/hide password, inline validation and a simulated sign-in state in vanilla JavaScript.

Forgot Password Form – Tailwind CSS login & sign up preview

Forgot Password Form

Tailwind CSS forgot password form with email validation, loading spinner, check-your-inbox success state and a resend cooldown timer.

Signup Form with Validation – Bootstrap 5 login & sign up preview

Signup Form with Validation

Bootstrap 5 signup form with live password rules, a strength meter, show/hide toggle, password confirmation and a required terms checkbox.

Split Login Page with Image – Bootstrap 6 login & sign up preview

Split Login Page with Image

Bootstrap 6 split-screen login page with a full-height photo and testimonial on one side and a floating-label form with Google and Apple sign-in on the other.

Forgot Password Form – Bootstrap 6 login & sign up preview

Forgot Password Form

Bootstrap 6 forgot password form with an email field, inline validation, a loading button, a stepper and a check-your-inbox success state with resend timer.

Login and Signup Tabs – Bootstrap 6 login & sign up preview

Login and Signup Tabs

Bootstrap 6 card with segmented tabs that switch between a sign-in form and a create-account form, with validation, cross-links and simulated submits.