Components · Layout and content

Collapsible

A collapsible is a row that opens and closes to show more content, used for FAQ lists and filters. The header can carry a descriptive text, icons, a toggle switch and a number badge. The content animates open.

Tokens, sizes, measurements, states and requirements. Values come from the live token package and from Figma: Base / Collapsible.

Design Tokens

Resolved from the live token package.

StatePartTokenValue

Sizes

Two sizes. Large changes at 769px, Small has the same values at every breakpoint.

PartLargeSmall
Header heightMinimum 72pxMinimum 56px
Header padding24px top and bottom16px top and bottom
Gap, text to the right group16px16px
Gap, icon to text8px8px
Gap, title to descriptive text2px2px
Leading and trailing icon, chevron24px20px
Toggle switch48 × 24px (Large)32 × 16px (X-Small)
Number badgebadge-number--md: 20px desktop, 18px mobilebadge-number--sm: 16px desktop, 14px mobile
Line under the row1px1px
Open row, space below the content32px32px
Header text to content text24px (header padding 24px)24px (header padding 16px + 8px)
Boxed: body padding24px on all sides16px on all sides
Filled: content top24px between the grey header and the content text16px between the grey header and the content text

Boxed

PartValue
Frame1px border-primary around the row
Header padding24px on all sides (Large), 16px (Small)
Open: headerNo background of its own (grey only with the Header background option), with a 1px line under it (an inset shadow, so it takes no space)
Open: bodyWhite (background-primary), padding 24px (Large) or 16px (Small) on all sides, on desktop and mobile, 12px between the parts

The header uses min-height, not height, so it can grow when the title wraps.


Measurements

Dimensions

Padding of the header at each size. The shaded areas are the padding. The numbers are read from the real component.

The header at true size (1:1). The padding is the same at every breakpoint.
AttributeValue
Padding, Large24px top and bottom, none at the sides
Padding, Small16px top and bottom, none at the sides
Padding, Boxed24px on all sides (Large), 16px (Small)
Minimum height72px (Large and Boxed Large), 56px (Small and Boxed Small)
Gap, text to right group16px
Gap, icon to text8px
Header text to content text24px in every size (--co-content-gap); boxed: header padding plus body padding, 48px (Large) or 32px (Small)
Open row, space below the content32px (Boxed: none, the body has 24px or 16px padding)
Line1px
CornersSquare

Spacing

The same distances as spacing tokens.

PartValue
Padding, Largespace-24
Padding, Boxed Largespace-24
Padding, Small and Boxed Smallspace-16
Gap, text to right groupspace-16
Gap, icon to textspace-8
Open row, space belowspace-32
Checkbox list: gap, bottomspace-24, space-24
Header text to content textspace-24 in every size; boxed: 48px / 32px

States

The title, the descriptive text, the icons and the chevron turn to the action hover color (dark theme: the title, the descriptive text and the icons dim, the helper text does not). An open row turns the chevron 180° and adds 32px of space below. Hover is forced on this page; in your code it comes from :hover.

Breakpoint
Size
Theme
StateClosedOpen

Disabled is defined once in Figma, under Theme Dark, with the disabled text color and the light line (border-primary). Here it is shown on both themes. Focus: a 2px ring on keyboard focus (border-focus).


Typography

ElementTokenMobileDesktop (769px+)Color
Title, Largetitle-md, weight 60018/22, 020/24, 0text-primary, hover text-action-primary-hover
Descriptive text, Largeregular, same size as the title18/24, 020/24, 0same as the title
Title, Smalltitle-sm, weight 60016/18, 016/18, 0same as the title
Descriptive text, Smallbody-md, weight 40016/22, 0.32px17/24, 0.32pxsame as the title
Helper textbody-sm, weight 40014/20, 0.36px14/20, 0.36pxtext-secondary, hover text-tertiary; dark text-primary-inverted (no hover change)
Contentbody-md, weight 40016/22, 0.32px17/24, 0.32pxtext-primary; 12px between paragraphs
Note under a listbody-sm14/20, 0.36px14/20, 0.36pxtext-tertiary
Count beside a checkbox16/2216/22, 0.32px16/22, 0.32pxtext-tertiary
“Show more”body-md, weight 60016/22, 0.32px17/24, 0.32pxtext-primary, underlined on hover

Breuer Condensed. The CSS weight is Figma minus 100.


Structure

Elements

ElementClassNotes
Rowcollapsible-wrapOne row, with the line under it. --open when open; --small, --boxed, --filled, --divider-top, --divider-bottom, --no-divider-bottom, --dark, --disabled are modifiers.
Headercollapsible-itemA <button> (recommended). The older <div onclick> still works. Not a button when it holds a switch.
Left groupcollapsible-item__leftThe icon, the text and the trailing icon.
Text groupcollapsible-item__text, __lineTitle and descriptive text on one line, helper text under it. Optional.
Titlecollapsible-item__labelBold.
Descriptive textcollapsible-item__infoRegular, after the title.
Helper textcollapsible-item__helperOptional.
Right groupcollapsible-item__endThe switch, the badge and the chevron.
Chevroncollapsible-item__chevronAn expand_more icon (ms). Leave it out for a row that does not open.
Contentcollapsible-item__contentMust follow the header directly: the script reads nextElementSibling.
Boxed bodycollapsible-item__bodyInside the content of a boxed row.
Content patternscollapsible-item__list, __row, __count, __support, __note, __moreA checkbox list with counts, supporting text and a “Show more” action.

Types

TypeMarkupUse
LargeDefaultFAQ lists and page sections.
Smallcollapsible-wrap--smallDense layouts such as filters.
Boxedcollapsible-wrap--boxed (Large), collapsible-wrap--small collapsible-wrap--boxed (Small)A framed row. The header is grey only with --filled.
Top dividercollapsible-wrap--divider-topA 1px line above the row (off by default).
No bottom dividercollapsible-wrap--no-divider-bottomRemoves the line under the row (on by default).
Bottom divider forcedcollapsible-wrap--divider-bottomKeeps the line under the last row in a section, for example a section with one collapsible.
Filledcollapsible-wrap--filledA surface-raised-secondary background on the header. The content stays white.
Darkcollapsible-wrap--darkOn a black surface.
Disabledcollapsible-wrap--disabled and disabled on the buttonA row that cannot be opened.

Width

As wide as the container.


Motion

PropertyDurationEasing
Content max-heightduration-fast-4 (200ms), set through --co-durationease-standard, set through --co-ease
Chevron transformthe samethe same
Row padding-bottomthe samethe same
Title, text and icon color on hoverduration-fast-3 (150ms)ease-standard

Opening is a state change on the spot, so it uses standard easing and a short duration (eco-motion). With prefers-reduced-motion: reduce every transition is off. Compare other values in the live Motion section on Examples & Guidelines.


Behavior

InputResult
Click the header, Enter or SpacetoggleCollapsible(this) toggles .collapsible-wrap--open, sets aria-expanded and sets max-height to the content’s scrollHeight. CSS cannot animate to auto.
Click the toggle switchChanges the switch only. A click on a link or on an element with data-collapsible-ignore in the header does the same.
HoverTitle, text and icons change color.
DisabledNo hover, no click, no Tab.
Several rowsIndependent: opening one does not close another.
BreakpointLarge changes size at 769px.
Window resize while openOpen point. The height is set once, when the row opens. If the text wraps differently after a resize, the height is not updated.

Accessibility Requirements

TopicRequirement
Header elementUse a button, so it is reached with Tab and works with Enter and Space (WCAG 2.1.1, 4.1.2). Older pages still use a div with onclick: it cannot take focus.
StateSet aria-expanded on the header; the script keeps it in sync. Link it to the content with aria-controls.
Switch in the headerA button cannot hold another control. A row with a toggle switch uses a div and has no chevron, or the switch moves out of the header. Open point: Figma shows a switch and a chevron together.
FocusA 2px ring on keyboard focus (border-focus), 2px outside the header.
ContentClosed content is visibility: hidden, so it is not read and cannot be focused.
ContrastThe disabled text color is exempt (WCAG 1.4.3). Helper text and counts use text-tertiary (4.5:1 on white).
MotionReduced motion: all transitions are off.