Tangible Design System · @tangible/ui 0.2.51 · Interactive version · Markdown

PasswordStrength

import { PasswordStrength } from '@tangible/ui';

Interactive docs and examples: PasswordStrength in Storybook.

PasswordStrength props

Prop Type Default Description
announce? boolean true Say the score through a polite live region a second after it settles on a new value. Only the score: the hint is read with the field. Off, both are still read with the field, through aria-describedby on the input. Render the meter from the first paint, even with no score, so the region exists before it has anything to say.
feedback? string What would make it stronger: "Add another word or two."
labels? PasswordStrengthLabels
score? 0 | 1 | 2 | 3 | 4 The estimate, 0 to 4. Leave it out while the field is empty, or while an estimator is still loading: the meter then shows no score and says nothing. Anything but a whole number from 0 to 4 counts as no score.

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Other exports

Examples

Stories: Default, Scores, With Feedback, Under A Field, Custom Labels (interactive page).

Component API tokens

Read via fallback, never declared. Set one on an ancestor to restyle every instance under it.