TextInput🔗

The TextInput component is controlled component input field that handles user events. For more on controlled components see here.

Default example🔗

Example email type with placeholder🔗

Invalid state🔗

Error state, useful for applying form validation.

Labelled with description and error text🔗

Label, helper and error text to give provide more context and useful hints.

I'm invalidThis is a helper text.

Props - TextInput🔗

Name
Description
Type
Default Value
descriptionRenders a description text underneath the input.string''
disabledboolfalse
errorMessageRenders a red error message for validation underneath the input.string''
idstringn/a
isValidRenders the input as valid or invalid.booltrue
labelRenders a label inside the input.string''
loadingboolfalse
namestringn/a
onChangeonChange handler. Triggers on every keyboard and generally is here where you change the value of the value property.funcn/a
typestringn/a
valueValue of the textInput. This should be stored in the state of the parent component.string''
2022 © Volvo Car Corporation