Password input

A password field with a reveal toggle that is named and does not submit the form it sits in.

Reach for it

A secret, with a reveal control that is a real labelled button.

Not for

Any other sensitive value. Reveal only makes sense where typing is blind.

Revealing and hiding

Both labels are required, and the accessible name flips with the state, so the button always says what pressing it will do rather than what the field is currently showing.

The toggle says what pressing it will do

The two passwords do not match

API reference

PasswordInput

PropTypeDefaultDescription
showLabel*string-Names the toggle while the password is hidden.
hideLabel*string-Names the toggle while the password is visible.
size'small' | 'medium' | 'large'medium
hasStartAdornmentbooleanfalseRoom for a marker or a button inside the control's own padding box. The padding belongs to the control, so it lives here. The marker's own geometry belongs to the marker, so it lives in adornment.ts. Four components each carried the whole table before, and the one in combobox.tsx said "mirroring SearchInput" in a comment, which is the note a copy leaves behind.
hasEndAdornment'true' | 'false' | 'double'false`double` is two markers at the end, a clear button beside a calendar button. Twice the room, so the value never runs under either of them.

Also takes the standard attributes of a input, minus className, style, size and type.