Skip to content

Add optional password strength indicator to dile-password component#11

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/update-dile-password-component
Draft

Add optional password strength indicator to dile-password component#11
Copilot wants to merge 5 commits intomasterfrom
copilot/update-dile-password-component

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 11, 2026

Adds real-time password strength visualization with color-coded progress bar and text label.

Changes

  • New property: showStrength (boolean, default: false) - opt-in to preserve backward compatibility
  • Strength algorithm: Scores 0-4 based on length (8+, 12+) and character variety (lowercase, uppercase, digits, special chars)
  • Visual feedback: Animated progress bar with 4 levels (Weak/Fair/Good/Strong) using distinct colors (red/orange/blue/green)
  • Styling: CSS custom properties for label customization (--dile-password-strength-label-font-size, --dile-password-strength-label-color)
  • Performance: Static getters for constant arrays to avoid per-keystroke allocations

Usage

<dile-password 
  label="Password" 
  showStrength>
</dile-password>

Visual

Password strength indicator showing all four levels (weak, fair, good, strong) with color-coded progress bars

Implementation Notes

Strength calculation maps raw score (0-6) to normalized levels (0-4) via 1.5x normalization factor. Indicator only renders when showStrength=true and password is non-empty. Extends DileInput's styles array to preserve base component styling.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 11, 2026 17:51
Co-authored-by: midesweb <281585+midesweb@users.noreply.github.com>
Co-authored-by: midesweb <281585+midesweb@users.noreply.github.com>
Co-authored-by: midesweb <281585+midesweb@users.noreply.github.com>
Co-authored-by: midesweb <281585+midesweb@users.noreply.github.com>
Copilot AI changed the title [WIP] Update password strength display in dile-password component Add optional password strength indicator to dile-password component Feb 11, 2026
Copilot AI requested a review from midesweb February 11, 2026 17:59
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.

2 participants