Rxova
Skip to content

UsePasswordInputResult

capsLock: boolean;

Caps Lock is on and capsLockWarning is enabled.


captureSelection: () => void;

Wire to the toggle’s onMouseDown so the caret survives the reveal.

void


checking: boolean;

A checkCompromised call is in flight.


clear: () => void;

Empty the field. Present on every input hook in the suite.

void


compromised: boolean | null;

true / false once checkCompromised resolves, null before that.


disabled: boolean;

handleBlur: (event) => void;
ParameterType
eventFocusEvent<HTMLElement>

void


handleFocus: (event) => void;
ParameterType
eventFocusEvent<HTMLElement>

void


handleModifierEvent: (event) => void;

Wire to the input’s onKeyDown/onKeyUp to keep the Caps Lock flag live.

ParameterType
event| KeyboardEvent<HTMLElement> | MouseEvent<HTMLElement, MouseEvent>

void


ids: object;

Stable ids for the input and each piece of describing text.

announcement: string;
capsLock: string;
compromised: string;
input: string;
label: string;

Only referenced when label is a node rather than a string.

rules: string;
strength: string;

inputRef: object;

Structural rather than RefObject: in @types/react 18 RefObject.current is readonly, in 19 it is mutable. Declaring the shape keeps this assignable under both, which matters because react >= 18 is a peer.

current: HTMLInputElement | null;

maxLength: number;

maxLength after coercion. Always set — an unusable value falls back to the default.


minLength: number;

minLength after coercion — also what the default length rule uses.


revealed: boolean;

The password is currently rendered as plain text.


rules: PasswordRuleState[];

Every rule with its met flag.


setRevealed: (next) => void;
ParameterType
nextboolean

void


setValue: (next) => void;
ParameterType
nextstring

void


strength: PasswordStrength;

The estimator’s verdict for the current password.


toggleReveal: () => void;

void


type: "password" | "text";

'text' when revealed, 'password' otherwise.


valid: boolean;

All required rules met, minScore reached, and not known-compromised.


value: string;

The current password.