The accordion component lets users show and hide sections of related content on a page.
The component loads with all sections hidden. To show a section, the user can interact anywhere in the heading button.
{{ aspExample({ code: "", nunjucks: "", json: "", title: "", example: "default", id: "65a928bb3e09f" }) }}Use an accordion to help users:
For example, an accordion can work well if the user needs to reveal and compare information that’s relevant to them.
Accordions hide content from the user. Not all users will notice them or understand how they work. For this reason, you should only use them in specific situations and if user research supports it.
Do not use an accordion for content that all users need to see.
Test your content without an accordion first. Well-written and structured content can remove the need to use an accordion.
It’s usually better to:
Accordions work best for simple content and links. Do not use accordions to split up a series of questions. Use separate pages instead.
Do not put accordions within accordions, as it will make content difficult to find.
This component is used on:
This list is not exhaustive.
The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.