For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/password-input.md.

PasswordInput

A password field with a reveal toggle, which is the whole point of reaching for it over an Input of type password. Where rules are enforced, pair it with PasswordComplexity so the reader watches them being met rather than discovering them on submit.

Source · Storybook

Usage

import { PasswordInput } from '@wallarm-org/design-system/PasswordInput';

Examples

With field

Inside Field, which supplies the label and description above it.

With error

error on the field. Say what is wrong in FieldError — a red border on a masked field leaves the reader guessing at something they cannot see.

With requirements

PasswordComplexity fed by the exported passwordValidators, ticking off each rule as it is met. Show the rules from the start rather than revealing them after a failure.

Disabled

Dimmed, with the reveal toggle out as well — there is nothing to reveal that the reader can act on.

Sizes

The same height scale as Input, so a password field lines up with the fields around it.

Props

PropTypeDefaultDescription
titlestring | undefined
patternstring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, HTMLInputElement> | undefined
disabledboolean | undefinedfalse
namestring | undefined
valuestring | number | readonly string[] | undefined
size{ default: string; medium: string; small: string; 'inline-edit': string; }default
altstring | undefined
data-testidstring | undefined
heightstring | number | undefined
srcstring | undefined
widthstring | number | undefined
error{ true: string; false: string; }false
autoCompleteHTMLInputAutoCompleteAttribute | undefined
maxLengthnumber | undefined
minLengthnumber | undefined
placeholderstring | undefined
readOnlyboolean | undefined
requiredboolean | undefined
checkedboolean | undefined
stepstring | number | undefined
acceptstring | undefined
maxstring | number | undefined
minstring | number | undefined
multipleboolean | undefined