Skip to content
IndexRequest a UIAboutContact

Password Strength Meter

A password field with a show toggle, a four-step meter and a plain-language tip; length matters more than symbols.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Clean UI mockup of a sign-up form password field with a show eye icon at the right, below it a four-segment strength meter with two segments filled in orange and the label Fair, a hint line reading Add another word to make it stronger, and a small checklist with a green check for at least 12 characters and a grey circle for not a common password, light theme, flat modern style. Negative: heavy shadows, clutter, text errors, device frames. Reduced motion: static design.

About this pattern

Definition

A strength meter gives quick feedback as someone types. The most helpful rules are length and avoiding common passwords, not forced symbols. A good meter says what to do next, such as add another word, and never claims the password is safe; it only estimates how hard it is to guess.

Purpose & UX principles

  • Score mostly on length; a long passphrase beats a short complex one.
  • Mark very common passwords as weak at once.
  • Show the meter with text, not colour alone, and announce changes politely.
  • Provide a Show toggle so people can check what they typed, and allow pasting from password managers.

Interaction states

  • Type a password; try a common one, a short one and a long passphrase.

Motion specification

  • The meter fills over 200ms.
  • Reduced motion: no transition.

Responsive behaviour

  • Do not send the password anywhere to measure it in the browser demo.
  • A client-side meter is only a hint; the server must still apply real checks.

Code

HTML
<div class="bx"><label class="fl" for="pw">Password</label><div class="inp"><input id="pw" type="password" autocomplete="off" spellcheck="false" aria-describedby="hint"><button type="button" class="mini" id="sh" aria-pressed="false">Show</button></div><div class="mt" aria-hidden="true"><i></i><i></i><i></i><i></i></div><p class="st" id="st" role="status">Start typing.</p><ul class="ck" id="ck"></ul><p class="out" id="hint">This demo checks nothing on a server and stores nothing.</p></div>

Related patterns

Form Error Summary

↗
Form Error SummaryFeedback & Notifications

Tag Input with Chips

↗
Tag Input with ChipsInputs & Forms

Copy Feedback Button

↗
Copy Feedback ButtonMicro Interactions