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

  • labelstring

    Label text.

  • valuestring

    Current value.

  • onChange(value: string) => void

    Called with the new value.

  • errorstring

    Error message shown below the control; sets the invalid style.

  • placeholderstring

    Placeholder text.

  • autoCompletestring
    Default: 'current-password'

    Native autocomplete hint.

  • disabledboolean
    Default: false

    Disable the input and toggle.

  • classNamestring
    Default: ''

    Extra classes for the root element.

  • ...rest

    Any other props are passed to the underlying element.