Skip to main content

TextField

Text fields let users enter and edit text.

When to use#

When a maxLength and label needs to be provided.

Examples#

import { TextField } from 'tailor-ui';

Basic#

With maxLength#

12

With textarea#

With textarea & maxLength#

100

With textarea & error#

With maxLength & error#

12

With empty label#

30

With controlled value switch#

18

API#

PropertyDescriptionTypeDefault
labelThe label textstring
valuevalue of the TextFieldstring
defaultValuedefaultValue of the TextFieldstring
maxLengthThe content max length of textfieldnumber
textareaWhether the input is a textareabooleanfalse
disabledDisabled the TextFieldbooleanfalse

If you are using textarea props, you can consult Input's documentation to find more textarea APIs.