UI Accordions: Basics & Best Practices
Learn how to present information with functional, aesthetic, and accessible accordions
Accordions are design elements commonly used to expand and collapse content on a webpage or application. They function like a musical accordion, where sections can be compacted or stretched to reveal more information. This feature is especially useful for organizing large amounts of content in a limited space, making them a frequent choice for FAQs, forms, menus, and long lists.
Well-designed accordions are an asset to UI because they allow users to quickly find what they need without overwhelming them with too much information at once.
An
Think of a collapsed
Use a plus sign (+) or down arrow (⌄ or ▼) to show a collapsed section. When the section is expanded, switch to a minus sign (−) or up arrow (⌃ or ▲). This tells users that the content is visible and can now be collapsed.
Pro Tip: Deviating from familiar icons can confuse users about the menu's expandability, leading to frustration, so stick to widely recognized ones.
The hover state is activated when users move their cursor over an interactive element, effectively signaling, "This is clickable!" To ensure clarity, provide at least two visual cues indicating the component's hover state. A combination of a pointer cursor and a color change, for example, is sufficient to convey the element's interactivity.
Each
On mobile devices, ensure touch targets are especially user-friendly with a recommended minimum height of 44 pixels, adhering to accessibility standards.[1]
Styling the
Avoid cluttering with non-essential links, buttons, or additional subsections inside the content area, as this can make the interface complicated and challenging to navigate.
Commonly, you can only open one section at a time with an accordion. When users click another section, the open one collapses automatically. This reduces user actions so they don't need to close it manually, and keeps the page uncluttered. The downside to this behavior is that users cannot compare
Avoid automatic collapsing and keep all sections expanded by default. Scrolling is much easier and requires less cognitive load than clicking a section each time you need to recall the information.[2] Automatic collapsing is only safe when there aren't many sections, and users don't need to jump over the page scrolling up and down. Providing a Collapse All/Expand All
Upon expanding an
Additionally, stylistic alterations such as bolder text or more pronounced borders can draw attention to the active
The placement of
By positioning the icons uniformly — either all on the left or all on the right — across each section, users can scan the
Pro Tip: Make sure the whole section is clickable/tappable and not just icons.
Properly styled headings are vital in creating a clear type hierarchy within
To optimize their effectiveness, headings should distinctly stand out from the body text. Employ strategies like using a larger font size, a different typeface, capitalization, or a bolder font-weight to make them noticeable.
However, balance is key — ensure these titles are eye-catching without dominating the
Headings in
- Keep them concise and to the point.
- Use language that speaks directly to users' needs.
- Incorporate keywords for easy scanning.
- Ensure they accurately reflect the content within.
Research plays a crucial role here. By understanding what matters to your users, you can tailor headings to their preferences and questions, making your accordions not just a design element, but a valuable, user-focused tool.
For extremely lengthy pages, accordions may not be ideal. Consider alternative
If accordions are used, ensure they allow multiple sections to be open simultaneously for easy access to various content parts. The state of each section (open or closed) should persist based on user interaction.
References
- Accordions for Complex Website Content on Desktops | Nielsen Norman Group