Skip to content

Accordion

Accordion

Accordion provides collapsible content panels for organizing and displaying information in a space-efficient manner with smooth expand/collapse animations.

PropertyValue
Padding24px (p-6)
BorderBottom 1px (border-b)
Border Color#E5E7EB (border-primary-tselGrey40)
Icon Size16px (w-4)
Animation Duration250ms (duration-250)
Max Height (Open)1000px
OptionTypeDefaultDescription
data.labelobjectrequiredLabel text per language
data.guidesobjectrequiredHTML content per language (injected)
config.disabledbooleanfalseDisables interaction and reduces opacity
config.showIconbooleantrueToggles visibility of toggle icon
StateLogic
Toggletoggle() method switches opened boolean
Animationmax-h-0 → 1000px transition on opened class
Icon Rotationtransform rotate-180 when opened
Disabledopacity-50 and pointer-events-none applied

Default interactive accordion item.

Error Variant

Non-interactive state: config.disabled = true applies opacity-50 and disables pointer events.

Error Variant
  • Organizing large amounts of content
  • Progressive disclosure of information
  • FAQ sections
  • Settings panels with categories
  • Document or help content organization
✅ Do❌ Don’t
Keep titles concise and descriptiveUse vague headings
Logically group related contentMix unrelated topics
Allow panel content to breatheOverfill panels
Use meaningful iconsSkip visual indicators
Consider mobile touch targetsMake headers too small
Persist state when appropriateRandom open/close behavior
  • Keyboard navigation with Enter/Space
  • Accessibility (expanded state)
  • Proper heading hierarchy
  • Focus visible indicators
  • Screen reader announcements
ElementRecommendation
Title Length20-50 characters
Title StyleSentence case
Content StructureUse subheadings for long content
Panel Count3-8 items recommended

View in Storybook →