Skip to main content

Accordions

The accordion element delivers large amounts of content in a small space through progressive disclosure.

Specifications

Default




Accordions are containers that expand to reveal content progressively to limit the amount of information on the page or in a section to reduce clutter. The content can be expanded and collapsed based on the user’s interest.

Compact




Accordions are containers that expand to reveal content progressively to limit the amount of information on the page or in a section to reduce clutter. The content can be expanded and collapsed based on the user’s interest.

  • Accordions can display directly on the page or in a card container.
  • The arrow icon acts as an affordance to indicate the functionality of the accordion and as a visual marker of the state of the accordion through its rotation and direction.
  • When stacking multiple accordions, use stack space constants to add margin-bottom to the block element.

This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.

This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.

This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.

This is the first item's accordion body. It is shown by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.

This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.

This is the third item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
Do use the without border variation to omit the border from the first accordion in a stack when it may conflict with other visual elements, like a Module Container. Don’t use an unnecessary border to avoid visual noise.

Colors

Element Property Color
Button Color Trimble Gray White
#252a2e
#ffffff
Color (Disabled) Gray 2 White
e0e1e9
#ffffff
Background White Trimble Gray
#ffffff
#252a2e
Background (Hover/Active/Focus) Gray 0 Gray 8
e0e1e9
#464b52
Border-Bottom Gray 1 Gray 6
#cbcdd6
#6a6e79
Icon Color Trimble Gray White
#252a2e
#ffffff

Behavior

  • Accordions allow a single section to expand at one time, while automatically collapsing the section that loses focus (default behavior), or they allow for all sections to expand at the same time.
  • When an accordion expands and collapses, only its height should change; its width should stay consistent.
  • The expand-and-collapse functionality of an accordion is tied to the entire header of the element with additional actions being triggered only by interaction within the bounds of their related UI element.
  • Avoid “nested” accordions—that is, collapsible content within collapsible content. This type of pattern goes against UX best practices.

Editorial

  • Keep titles to five words, if possible, to avoid wrapping.
  • Use title case and capitalize prepositions of four letters or more.
Last updated September 20, 2024.