Text inputs are form inputs that gather plain text information from users. Every text input component must have a label and an input field. Optional placeholder text can also be added to provide the user with example input and guidance for filling in the field.
In addition to the default state, both types of text inputs have hover, focus, change, blur and error states. The error state must be used with an input error component. An optional disabled state is also available.
A text input or text area in the error state must be used with an input error component to guide the user in correcting the error.
Keep a margin of 16px between the text input and any components above or below it. Text inputs will fill 100% width of the parent container when standing alone. When inline with another component, they will fill 50% width. Keep a 16px margin between the text input and any inline components.
Placeholders should give the user an example or show the required format of the input. Never use a placeholder instead of a label, as the user will lose the prompt once they begin typing. Use sentence case with no end punctuation, unless otherwise dictated by the input format.