Accordion

The accordion shortcode creates collapsible content sections that expand and collapse when clicked. It’s perfect for FAQs, documentation sections, or any content that benefits from progressive disclosure.

Usage

GO
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{{< accordion caption="Optional Caption Text" >}}
title: First Accordion Title
content: Your content here. **go** is supported!

<!--accordion-->

title: Second Accordion Title
content: More content here.
You can have multiple paragraphs.

- Bullet points work
- Lists are supported

<!--accordion-->

title: Third Accordion Title
content: Final section content.
{{< /accordion >}}

Parameters

ParameterRequiredDefaultDescription
captionNo-Optional caption displayed below all accordion items
Table: Accordion Parameters

Content Structure

Each accordion item is separated by <!--accordion--> and must follow this format:

FieldRequiredDescription
title:YesThe clickable header text for the accordion item
content:YesThe collapsible content (supports rich content).
Table: Accordion Item Fields

Examples

Basic Accordion

Accordion with Caption

Frequently Asked Questions

Accordion with Rich Content

Dark Mode Support

The accordion automatically adapts to dark mode using your theme’s color variables: