Password Meter
x-bladewind::password-meter watches an existing password field and shows a
rules-based strength reading as the user types: a segmented bar plus a text label, live-updated on every
keystroke. It is a standalone companion, not a wrapper: point it at any password field with
for, BladewindUI's own or otherwise.
<x-bladewind::input type="password" name="password" label="Password" viewable="true" />
<x-bladewind::password-meter for="password" />
for is the watched field's name (or, failing that, its
id): exactly what you already passed the field itself, nothing extra to keep in
sync.
How strength is scored
A password earns up to four points: one for reaching minLength characters
(8 by default), a second for reaching strongLength (12 by default), and up to two
more for character variety: lowercase, uppercase, digits, and symbols each count, capped at two points so
length still matters. Four points is "Strong", one is "Weak", and an empty field shows nothing at all.
<x-bladewind::password-meter for="password" min-length="10" strong-length="16" />
Hiding the label
The bar is always shown; set show-label="false" to drop the text readout beside
it and rely on the bar's colour alone.
<x-bladewind::password-meter for="password" show-label="false" />
Full List Of Attributes
| Option | Default | Available Values |
|---|---|---|
| for | required | The name (or id) of the password field to watch. |
| showLabel | true | Shows the "Weak" / "Fair" / "Good" / "Strong" text readout. |
| minLength | 8 | Character count that earns the first length point. |
| strongLength | 12 | Character count that earns the second length point. |
| class | (blank) | Additional CSS classes for the wrapper element. |
Password Meter with all attributes defined
<x-bladewind::password-meter
for="password"
show-label="true"
min-length="8"
strong-length="12"
class="ml-2" />
resources > views > components > bladewind > password-meter.blade.php