Skip to main content
  1. Docs
  2. Components
  3. Navigation

Collapsible

One section that folds, with no rules: Show more, or Advanced settings.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<button aria-expanded>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Advanced options most people leave alone.
  • Show more, under the first few of a list.
  • A detail beside a row: a webhook's retry policy.
Not for

02

Anatomy

  1. 1collapsible-trigger<button>Your control, through render: aria-expanded.
  2. 2chevron<svg>The Button's trailing icon: it turns as the panel opens.
  3. 3collapsible-panel<div>What folds, with the height animation.

03

Do and don't

Say what's folded
DoA label that names what opens.
Don'tMore: more of what?
One section
DoOne fold, for what most people skip.
Don'tA stack of folds: use an Accordion, ruled, with headings.

04

Content

  • Name what opens: Advanced settings, Retry policy.
  • Show more with a number: "Show 3 more"; then "Show fewer".
  • Sentence case, no full stop.
Next — CollapsibleAPI