Password Strength MeterLoading saved progress…

Password Strength Meter

A password strength meter scores a password as the user types and turns that score into immediate visual feedback. Build the meter as a React component whose input state drives four checks, four bars, a color, and a text label.

Signature

Implement the default App component in App.tsx. Keep the password in React state and derive a numeric score from it during render.

Examples

  • An empty password scores 0: no bars are filled and the label reads Too weak.
  • abcdefgh passes only the length check, so it scores 1 and reads Weak.
  • Abcdefg1 passes length, mixed case, and digit checks, so it scores 3 and reads Good.
  • Abcdefg1! passes all four checks, so all bars turn green and the label reads Strong.

Notes

  • Four checks: award one point for length of at least 8, mixed lowercase and uppercase letters, a digit, and a non-alphanumeric symbol.
  • Derived score: keep only password in useState; do not store a second score state that can drift.
  • Controlled field: wire both value and onChange on the password input.
  • One score, three views: use the score for the sN meter class, the filled-bar count, and the label lookup.
  • Accessibility: preserve the input label, description relationship, and polite live label supplied by the starter.
WE’RE LISTENING

Help make UIReady better

Found a bug or have an idea? Tell us about it.

Up to 3 files · 5 MiB each · JPG, PNG, WebP, MP4, WebM, MP3, M4A or WAV