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
<gcds-text>

Also called: text block, copy, caption, body text, paragraph.

Text is a styled and formatted paragraph that displays written content in an accessible way.

Text component preview

Build a text component

Text displays non-heading content with matching GC Design System styles to provide accessible text sizes and colour contrast.

Coding and accessibility for text

Ensure accessible character limits

  • Maintain the default line length maximum of 65 characters for each line of text to ensure a comfortable, accessible reading length.
  • Opt to shorten the line length by setting the character-limit attribute to false.

Set the text size

  • Set the text size attribute to body or small.
  • Use the default body size value to render a p element with the recommended font size and colour contrast.
  • Opt to display smaller text by setting the size attribute to small to render a small element inside a p element.

Use text styling sparingly

  • Only use underline for links.
  • Use bold text sparingly.
  • Avoid using bold text as a heading. Headings are the accessible component for identifying content sections.
  • For bold text, use the strong tag within the gcds-text component to highlight terms and emphasize key points.
  • Only use italics for:
    • Legal reference, like the Accessible Canada Act.
    • Words in other languages, including Latin.
    • Titles of publications, works of art, and mathematical and scientific material.
  • Use the em tag within the gcds-text component to emphasize specific words or phrases.

Get your code

Generate an instance of the component you need by selecting its code properties.

  1. Explore by choosing different code values to generate the instance you want.

  2. Get the code and pull it into your environment.

  3. Add any copy you need to the component (like text for a label).

Note: The code builder uses English for all code elements, which follows standard practice.

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
2025-10-14