Details

Collapsible disclosure block for supplementary content. Renders as a native <details> element.

Basic usage

Content is hidden by default and revealed when the user clicks the summary.

{% details summary="Click to reveal more information" %}
This content is hidden by default. The details rune wraps content in a native disclosure element that the user can toggle open and closed.
{% /details %}
<details data-rune="details">
  <summary data-field="summary">Click to reveal more information</summary>
  <div data-name="body">
    <p>This content is hidden by default. The details rune wraps content in a native disclosure element that the user can toggle open and closed.</p>
  </div>
</details>
Click to reveal more information

This content is hidden by default. The details rune wraps content in a native disclosure element that the user can toggle open and closed.

<details class="rf-details" data-rune="details" data-density="full">
  <summary data-field="summary" data-name="summary" class="rf-details__summary">Click to reveal more information</summary>
  <div data-name="body" class="rf-details__body">
    <p>This content is hidden by default. The details rune wraps content in a native disclosure element that the user can toggle open and closed.</p>
  </div>
</details>

Open by default

Use open=true to have the block expanded when the page loads.

{% details summary="This one starts open" open=true %}
Since `open=true` is set, this block is expanded when the page loads.
{% /details %}
<details data-rune="details" open>
  <summary data-field="summary">This one starts open</summary>
  <div data-name="body">
    <p>
      Since
      <code>open=true</code>
      is set, this block is expanded when the page loads.
    </p>
  </div>
</details>
This one starts open

Since open=true is set, this block is expanded when the page loads.

<details class="rf-details" open data-rune="details" data-density="full">
  <summary data-field="summary" data-name="summary" class="rf-details__summary">This one starts open</summary>
  <div data-name="body" class="rf-details__body">
    <p>
      Since 
      <code>open=true</code>
       is set, this block is expanded when the page loads.
    </p>
  </div>
</details>

Attributes

AttributeTypeDefaultDescription
summarystring"Details"The clickable summary text
openbooleanfalseWhether the block is initially expanded

Common attributes

All block runes share these attributes for layout and theming.

AttributeTypeDefaultDescription
widthstringcontentPage grid width: content, wide, or full
spacingstringVertical spacing: flush, tight, default, loose, or breathe
insetstringHorizontal padding: flush, tight, default, loose, or breathe
tintstringNamed colour tint from theme configuration
tint-modestringautoColour scheme override: auto, dark, or light
bgstringNamed background preset from theme configuration