A text input is a type of form input that gathers plain text information from users. Every text input component must have a label and an input field. Optional placeholder and caption elements can also be added. These will provide the user with examples and more information about how to fill in the field.
<label for="label-1" class="c-label">Label Name</label>
<input type="text" class="c-text-field" id="label-1" placeholder="Text input placeholder"/>
<label for="label-2" class="c-label">Label Name</label>
<textarea name="" class="c-textarea" id="label-2" placeholder="Textarea placeholder"></textarea>
In addition to the default state, both types of text inputs have hover, focus, change and blur states. Optional success and loading states are also available. The error state takes the form of an `Input Error` component.
<label for="label-3" class="c-label">Label Name</label>
<input type="text" class="c-text-field" id="label-3" placeholder="Text input placeholder" value="John Doe"/>
<label for="label-4" class="c-label">Label Name</label>
<input type="text" class="c-text-field--disabled" disabled id="label-4" placeholder="Text input placeholder" value="John Doe"/>
<label for="label-5" className="c-label">
Label Name
</label>
<textarea
name=""
className="c-textarea c-textarea--disabled"
id="label-5"
placeholder="Textarea placeholder"
></textarea>