GC Design System Components Installation Page templates Contact us Get involved Find a demo GC Design System Components

Details
<gcds-details>

Also called: accordion, collapse.

Details is an interactive switch for a person to expand or collapse content.

Details component preview

Details anatomy

This is an anatomy of the open details component. By default, the content is collapsed.

  1. The details title summarizes the details content. Label text is in sentence case (only the initial letter is capitalized).
  2. The caret and the details title toggle the content display. The caret indicates if the component is currently open or closed. When it's open, revealing the details text, the caret points to details content.
  3. The content displays any text and images that the reader can choose to expand or collapse.

Open details

Learn more about this topic taxonomy with three labels: details title, icon and content.  Details title pointing at Learn more about this topic. Learn more about this topic is greyed blue font underlined. Icon pointed at a dark blue triangle arrow infront of the details title. When the arrow is selected it points down to show Additional information.

Closed details

Learn more about this topic taxonomy with two labels: details title and icon. The details title pointing at Learn more about this topic. Learn more about this topic is dark font underlined. Icon pointed at a dark blue triangle arrow infront of the details title.

Design and accessibility for details

Work to reduce cognitive load – not add to it

Select the type of content to include in a details component

First, remove any content that's not useful or important to the main task. Then you can:

Use the summary to make content findable

Avoid nesting details

Alternatives to using the details component

The details component can increase cognitive load. Some people may be confused by how they work or overwhelmed by a list of titles to select.

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-01-22