Basic
Add data-bs-strength to a strength element next to the field. A strength-text shows the label.
Rules until the first letter
Text written inside strength-text shows while the field is empty, so the password rules can stand there until a level takes over.
Without a label
The strength-text is optional. Left out, the meter is the only feedback.
Number of segments
Segments fill in proportion, so a meter can have three, four or more of them.
Own labels
Pass data-bs-messages as JSON to rename the levels.
Stricter scoring
Raise data-bs-min-length and data-bs-thresholds to demand more before a password counts as strong.
Pointing at a field
With several password fields, name the one to rate with data-bs-input.
Reacting to the level
Every change of level fires change.bs.strength with the level and the score.
Without a field
Without a password field in its parent and without data-bs-input, the meter stays empty.