GC Design SystemComponents
GC Design System Start to use Page templates overviewBasic page Components overviewAlertBreadcrumbsButtonCardCheckboxesContainerDate inputDate modifiedDetailsError messageError summaryFieldsetFile uploaderFooterGridHeaderHeadingIconInputLanguage toggleLinkNoticePaginationRadiosScreenreader-onlySearchSelectSide navigationSignatureStepperTableTextTextareaTheme and topic menuTop navigation CSS Shortcuts overview Reset styles Responsive layoutState Box sizingContainer sizingDisplayOverflowPositionVisibility FontFont familyFont sizeFont styleFont weightLine heightLink colourLink sizeLink text decorationList styleText alignText colourText overflowText transformWord break MarginPadding Align contentAlign itemsAlign selfFlexFlex directionFlex growFlex shrinkFlex wrapGapGrid columnsGrid rowsJustify contentJustify itemsJustify selfOrderPlace contentPlace itemsPlace self Background colourBorder colourBorder radiusBorder styleBorder width Icon namesIcon sizeImage CursorPointer eventsTransition Styles overviewDesign tokensColourSpacingTypography Contact usGet InvolvedFind a demo

Details
<gcds-details>

Also called: accordion, collapse. Details is an interactive switch for a person to expand or collapse content.

Details component preview

Take a look at what problems the details component solves to see if they fit the problem you’re solving for.

Problems details solve

Use the details component to give a person a summary of more detailed content you’ve hidden that they can choose to reveal. Use this component to:
  • Reduce page size and scrolling when the content is lengthy and not essential to read in full. For example in an address collection pattern, the shipping address may be hidden using a details when it’s the same as the mailing or billing address.
  • Give a summary of content that is secondary to the main task and may be overwhelming to some readers.
  • Make a page with many subheadings scanable. For example, in a series of questions and answers, you can list the questions as details titles and a person can expand any section to read the answer content.
  • Give readers the option to control content for subjects that may cause distress to some readers. They can access certain content when they are ready and hide content once they’ve reviewed it.

Tabs when you want to replace the entire content of a section or a page. Links to provide navigation to a new page, website, or section on the current page or files for download. Buttons when a person modifies data, changes a state, or initiates a specific action.
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-05-06