Skip to main content

Accordion

Collapsible accordion panels. Tabs: Content, Layout, Behaviour, Styling, Animations, Advanced.

💡 Web dev tip: accordions are the "disclosure" pattern

An accordion is a set of show/hide panels. Each header should be a real <button> carrying aria-expanded="true"/"false" so screen readers know the state, and it must toggle with the keyboard (Enter or Space). UnysonPlus follows this WAI-ARIA pattern for you. W3C: disclosure pattern

Live demo​

▶ See the Accordion live on the demos site — an interactive example you can click through.

Content​

Accordion options panel — Content tab
  • Accordion Items — a repeatable list; each item has a Title, Content (rich text), and an Open by Default switch.

Layout​

Accordion options panel — Layout tab
OptionChoices
Title TagH2–H6 / Span / Paragraph
Icon StylePlus / Minus (+−), Plus / X (+×), Chevron (›), Arrow (▶), No Icon, Custom (image or text/emoji)
Icon PositionLeft, Right
Custom Closed/Open-State ImageUpload (used when Icon Style = Custom)
Custom Closed/Open-State TextText/emoji (used when Icon Style = Custom)
Item NumberingNone · 1, 2, 3 · 01, 02, 03 · a, b, c · A, B, C · i, ii, iii · I, II, III · Q1, Q2, Q3 · Custom…
Custom Template / Start NumberFor custom numbering
Item SpacingGap between items
Title AlignmentLeft (default), Center, Right
Screenshots — icon styles & numbering

These two options have several visible variants worth a screenshot each. Suggested files: accordion-icon-plus-minus, accordion-icon-chevron, accordion-icon-arrow, accordion-numbering-decimal, accordion-numbering-roman in static/img/shortcodes/.

Behaviour​

Accordion options panel — Behaviour tab
OptionChoices
Initially OpenFirst Item, None (All Closed), All Open
CollapsibleOn/Off
Multiple OpenOn/Off
URL Hash Deep-LinkingOn/Off
Show Expand / Collapse All ButtonsOn/Off

Styling​

Accordion options panel — Styling tab

Per-state Title, Content and Icon colors (closed/open), Background Color, and Margin & Padding.