Labelled input. Props: label, value, onChange (receives the value string), placeholder, error, type, autoComplete, required (default false; sets the native required and aria-required).

helperText shows a hint under the field while there is no error, and links it to the control with aria-describedby. Select, TextArea and PasswordInput take it too.

Shown until there is an error

Props

  • helperTextReactNode

    Hint under the field while there is no error; linked with aria-describedby.

  • labelstring

    Label text.

  • valuestring

    Current value.

  • onChange(value: string) => void

    Called with the new value.

  • placeholderstring

    Placeholder text.

  • errorstring

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

  • typestring
    Default: 'text'

    Native input type.

  • autoCompletestring
    Default: 'off'

    Native autocomplete attribute.

  • requiredboolean
    Default: true

    Sets aria-required.

  • ...inputProps

    Passed to the <input>.