Skip to content

feat(registry): add the password strength component - #62

Merged
moshiur01 merged 1 commit into
mainfrom
feat/password-strength
Nov 22, 2026
Merged

moshiur01 merged 1 commit into
mainfrom
feat/password-strength

Conversation

@moshiur01

Copy link
Copy Markdown
Contributor

Summary

Adds Password Strength, a password field with a four-bar strength meter, animated with GSAP.

  • Meter: bars scale in from the left (450ms power3.out), staggered 60ms one after another, and shift from red to teal as more rules pass.
  • Strength word: Weak / Fair / Good / Strong slides in from below when strength rises and from above when it falls.
  • Checklist: each rule's circle fills with the accent and a check draws in when it is met.
  • Eye: blinks shut and open while a slash draws across it to show or hide the password.
  • Asterisks: a hidden password shows * instead of dots. A 356-byte inline font, limited by unicode-range to the two mask characters (•, ●), turns each dot into an asterisk. The browser still draws the mask, so selection, the caret, scrolling and password managers behave like a native field.
  • Props: label, placeholder, name, autoComplete (default new-password), rules, value / defaultValue, onValueChange(value, met). Also exports defaultRules and the PasswordRule type.
  • Gallery preview media (password-strength-preview.mp4, 75 KB, and password-strength-poster.webp).

Accessibility

A real <input> with a <label>, described by the strength line and the rule list. Strength changes are announced politely, every rule ends with a hidden "(met)" or "(not met)", and strength is always given in words, not colour alone. The eye is a real button with aria-pressed. Under prefers-reduced-motion everything changes instantly.

Test plan

  • pnpm registry:build
  • pnpm typecheck
  • pnpm test: 1427 passed
  • Prettier check

🤖 Generated with Claude Code

A password field with a four-bar strength meter driven by GSAP. The bars
scale in one after another and shift from red to teal as more rules pass,
the strength word slides in, and each rule draws a check when it is met.
The eye blinks and draws a slash to show or hide the password. A hidden
password shows asterisks through a tiny inline font limited to the mask
characters, so selection, the caret and password managers behave like a
native field. Includes gallery preview media.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@moshiur01
moshiur01 merged commit d28ec0c into main Nov 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant