PasswordInput
Labelled password field with a show / hide toggle. onChange receives the value string. autoComplete defaults to current-password; use new-password on sign-up forms.
helperText shows a hint under the field while there is no error, and links it to the control with aria-describedby.
Props
labelstringLabel text.
valuestringCurrent value.
onChange(value: string) => voidCalled with the new value.
errorstringError message shown below the control; sets the invalid style.
placeholderstringPlaceholder text.
autoCompletestringDefault:'current-password'Native autocomplete hint.
disabledbooleanDefault:falseDisable the input and toggle.
classNamestringDefault:''Extra classes for the root element.
...restAny other props are passed to the underlying element.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | – | Label text. |
value | string | – | Current value. |
onChange | (value: string) => void | – | Called with the new value. |
error | string | – | Error message shown below the control; sets the invalid style. |
placeholder | string | – | Placeholder text. |
autoComplete | string | 'current-password' | Native autocomplete hint. |
disabled | boolean | false | Disable the input and toggle. |
className | string | '' | Extra classes for the root element. |
...rest | – | Any other props are passed to the underlying element. |