Accordion

Collapsible accordion sections. Use explicit {% accordion-item %} tags, or set headingLevel to automatically convert headings into accordion panels.

Basic usage

Wrap each section in an {% accordion-item %} tag with a name.

{% accordion %}
{% accordion-item name="What is refrakt.md?" %}
A content framework built on Markdoc that extends Markdown with semantic runes. You write standard Markdown — runes decide how it's interpreted.
{% /accordion-item %}

{% accordion-item name="How do runes work?" %}
Runes are Markdoc tags that wrap ordinary Markdown. The same list renders as navigation links, a feature grid, or action buttons — depending on which rune contains it.
{% /accordion-item %}

{% accordion-item name="Do I need to learn a new syntax?" %}
No. Runes use standard Markdoc tag syntax, and the content inside is regular Markdown.
{% /accordion-item %}
{% /accordion %}
What is refrakt.md?
What is refrakt.md?

A content framework built on Markdoc that extends Markdown with semantic runes. You write standard Markdown — runes decide how it's interpreted.

How do runes work?
How do runes work?

Runes are Markdoc tags that wrap ordinary Markdown. The same list renders as navigation links, a feature grid, or action buttons — depending on which rune contains it.

Do I need to learn a new syntax?
Do I need to learn a new syntax?

No. Runes use standard Markdoc tag syntax, and the content inside is regular Markdown.

Heading conversion

Use headingLevel to automatically convert headings into accordion items — no explicit tags needed.

{% accordion headingLevel=2 %}
## What is refrakt.md?

A content framework built on Markdoc.

## How do runes work?

Runes create interpretation contexts for Markdown content.
{% /accordion %}
What is refrakt.md?
What is refrakt.md?

A content framework built on Markdoc.

How do runes work?
How do runes work?

Runes create interpretation contexts for Markdown content.

Attributes

AttributeTypeDefaultDescription
headingLevelnumberConvert headings at this level into accordion items
multiplebooleantrueAllow multiple panels to be open simultaneously