Text area
<gcds-textarea>
Also called: text box.
A text area is a space to enter long-form information in response to a question or instruction.
-
GitHub -
Figma
Textarea component preview
Text area anatomy
- The text area label states the information a person should enter in the field. Label text is left aligned and in sentence case (only the initial letter is capitalized).
- The hint text communicates specific requirements for each text area to support task success.
- The field is the container a person interacts with to provide their response.
Design and accessibility for text areas
Write a short, specific, unique text area label
- Ask only for the information you need using as few words as possible. Phrasing as a question can make a label unnecessarily long.
- Choose unique labels for each text area and input within a page. A person browsing fields will hear the label text in rapid succession without cues to tell which label is for which context.
- Avoid using technical jargon, like "subject email address" or "account ID". Instead be specific and personal, "full name", "child’s age".
- Avoid using colloquialisms and common verb phrases that are unfamiliar to non-fluent speakers.
- Explain any term that may not be clear. For example, "Bio (tell us a bit about your background).
Support task success for text areas with hint text
- Add hint text to help a person filling in a text area to provide a complete value.
- Write hint text to be instructional, brief, and specific.
Write error messages for required text areas
- Use error messages to address missing and invalid entries.
- Write an error message for all required inputs. If a field is optional, avoid using an error message.
- Avoid blaming the person using the product. Instead, tell them exactly what to do to move forward.
Help us improve
Have questions or a request? Give feedback on our contact form.
Something's wrong? Raise it through GitHub with an