GC Design System Components
Home Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

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.

Textarea component preview

Text area anatomy

  1. 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).
  2. The hint text communicates specific requirements for each text area to support task success.
  3. The field is the container a person interacts with to provide their response.
Text area anatomy showing the Text area label, Hint text/ example message and dark blue outline white box for text input.

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 account. You'll have access to the team's direct responses, progress made on your issue, and issues raised by others.

Give feedback Report an issue on GitHub
2024-12-11