Skip to main content

molecules

Section frame

A section bordered on three sides with its heading on the open top edge. Content goes in the call body, and tone sets the colour.

Specimens

Default tone

Overview

Content goes in the call body.

{% call SectionFrame.render({ heading: "Overview", id: "frame-default-heading" }) %}
  <p class="p-4 text-neutral-300">Content goes in the call body.</p>
{% endcall %}
Neutral 600

Summary

A lighter neutral.

{% call SectionFrame.render({
  heading: "Summary",
  id: "frame-neutral-heading",
  tone: "neutral-600"
}) %}
  <p class="p-4 text-neutral-300">A lighter neutral.</p>
{% endcall %}
Accent

Recognition

The accent tone, used for awards.

{% call SectionFrame.render({
  heading: "Recognition",
  id: "frame-accent-heading",
  tone: "accent-600"
}) %}
  <p class="p-4 text-neutral-300">The accent tone, used for awards.</p>
{% endcall %}

Params

ParamTypeRequiredDescription
headingstringYes<h2> text.
idstringYes<h2> id. Also the section’s aria-labelledby, so it must be unique on the page.
tonestringNo"neutral-700" (default), "neutral-600", or "accent-600". Sets the border and rule colours; the heading text is 2 shades lighter for neutral (neutral-700 → text-neutral-500) and 1 for accent (accent-600 → text-accent-500), because yellow already reads brighter. Unknown values fall back to the default.
classesstring | variant map | arrayNoAppended to the <section>.
styles{ heading }Noheading is appended to the <h2>.

Notes

Give each frame a unique id, since it is also the section's aria-labelledby.