IPasswordStrength

interface
Form & Input

Result returned by computeStrength() and consumed by <OrigamPasswordField> to drive the strength bar UI. Carries a numeric score (0..4) and a semantic level identifier.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

score
requis
TPasswordStrengthScore
Numeric score 0..4 — number of bar segments that should fill. Maps 1:1 to the colour tier via level.
level
requis
TPasswordStrengthLevel
Colour-tier identifier (weak | fair | good | strong) resolving to the --origam-password-field__strength---bg-{level} token.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Reacting to strength changes

typescript