Skip to content
Devix Open Source

What a strength bar should say

Type a password, or press one of the classics. The number beside it is what a bar that counts capitals and symbols would have told you.

Live preview
<div class="demo demo--wide">
  <label class="demo-hint" for="email">Their email, so the meter can spot it in there</label>
  <input class="demo-input" id="email" value="ahmed@example.com">

  <label class="demo-hint" for="password">Password</label>
  <input class="demo-input" id="password" type="text" autocomplete="off" placeholder="Try typing one">
  <div id="meter"></div>

  <div class="demo-row">
    <button class="demo-btn demo-btn--ghost" data-try="P@ssw0rd1">P@ssw0rd1</button>
    <button class="demo-btn demo-btn--ghost" data-try="correct horse battery staple">correct horse battery staple</button>
    <button class="demo-btn demo-btn--ghost" data-try="ضصثقفغعه">ضصثقفغعه</button>
    <button class="demo-btn demo-btn--ghost" data-try="ahmed1990!">ahmed1990!</button>
  </div>

  <div class="demo-row">
    <div class="demo-seg" id="locale" role="group" aria-label="Language">
      <button type="button" data-locale="en" aria-pressed="true">English</button>
      <button type="button" data-locale="ar">العربية</button>
      <button type="button" data-locale="ur">اردو</button>
    </div>
  </div>

  <dl class="demo-kv" id="out"></dl>

  <p class="demo-hint"><strong>P@ssw0rd1</strong> has a capital, a digit, a symbol and nine
    characters — full marks on every bar that counts those, and it is in every wordlist.</p>
</div>