PasswordInput

Password input with reveal toggle and optional strength meter

Category: inputs · WCAG 2.2-AA · form, password, input, security

Sizes

States

Props

PropTypeDefaultDescription
showStrengthMeterbooleanfalseWhen true, shows a password-strength meter.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
labelsPasswordInputLabelsOverrides for the component’s user-visible strings (i18n).
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
placeholderstringPlaceholder text shown when the field is empty.
valuestringThe controlled value.
onChange(e: React.ChangeEvent<HTMLInputElement>) => voidCalled when the value changes.

Design tokens

When to use

When not to use

How to build an accessible PasswordInput in React →

Examples

Basic

<PasswordInput placeholder="Enter password" />

With strength meter

<PasswordInput showStrengthMeter placeholder="Create password" />

Related components

← Back to docs