INV-2291 · Northwind Logistics
Overdue 12 days Contact confirmed Owner: Finance operations Updated
<forma-cluster>
Wraps related inline items while preserving semantic source order.
<forma-cluster>patterns/cluster.htmlA cluster places related items in a row and lets them wrap onto further rows when the row runs out of space. It is the primitive for action rows, tag and status sets, metadata lines and filter chips: groups whose members are peers and whose count or label length is not known in advance. Items are vertically centered on each line and separated by one gap in both directions. Wrapping is intrinsic, so the same markup works in a toolbar, a card footer and a phone-width panel.
The smallest correct markup: the canonical pattern from patterns/cluster.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its links point to placeholder destinations that do not exist on this site. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-cluster class="forma-component-tag">
<div class="forma-cluster" aria-label="Related actions">
<button type="button">Primary action</button>
<button type="button">Secondary action</button>
<a href="#details">View details</a>
</div>
</forma-cluster>
Click or tap the code once to select all of it, then copy.
The primary and secondary actions of a form footer. When the translated labels no longer fit on one line, the secondary actions wrap below the primary one instead of overflowing.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-cluster class="forma-component-tag">
<div class="forma-cluster" role="group" aria-label="Invoice actions">
<button type="submit">Send invoice</button>
<button type="button">Save as draft</button>
<button type="button">Discard changes</button>
</div>
</forma-cluster>
Click or tap the code once to select all of it, then copy.
A cluster of status lozenges and plain metadata under a record title. Each lozenge carries its state in text, so the line survives grayscale and forced colors.
Overdue 12 days Contact confirmed Owner: Finance operations Updated
<forma-cluster class="forma-component-tag">
<article class="forma-stack" data-density="compact" aria-labelledby="cluster-record-metadata-title">
<h2 id="cluster-record-metadata-title">INV-2291 · Northwind Logistics</h2>
<p class="forma-cluster">
<span class="forma-status-lozenge" data-state="attention">Overdue 12 days</span>
<span class="forma-status-lozenge" data-state="ok">Contact confirmed</span>
<span>Owner: Finance operations</span>
<span>Updated <time datetime="2026-09-28">28 Sep 2026</time></span>
</p>
</article>
</forma-cluster>
Click or tap the code once to select all of it, then copy.
A filter summary with a narrower gap set through --forma-cluster-space. Links remain full-size targets; only the space between them changes.
Static specimen. Its links point to placeholder destinations that do not exist on this site. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-cluster class="forma-component-tag">
<nav aria-label="Active filters">
<p class="forma-cluster" style="--forma-cluster-space: 0.5rem">
<a href="#status-open">Status: open</a>
<a href="#owner-me">Owner: me</a>
<a href="#region-emea">Region: Europe, Middle East and Africa</a>
<a href="#clear-filters">Clear all filters</a>
</p>
</nav>
</forma-cluster>
Click or tap the code once to select all of it, then copy.
Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.
Four toolbar buttons at phone width. The row wraps into two lines rather than scrolling or shrinking the buttons.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-cluster class="forma-component-tag">
<div class="forma-cluster" role="toolbar" aria-label="Document tools">
<button type="button">Comment</button>
<button type="button">Suggest edit</button>
<button type="button">Share</button>
<button type="button">Download PDF</button>
</div>
</forma-cluster>
Click or tap the code once to select all of it, then copy.
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its links point to placeholder destinations that do not exist on this site. Its controls are shown for their markup and appearance and cannot be operated here.
Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.
| Attribute | On | Values | Default | Description |
|---|---|---|---|---|
role | .forma-cluster | group | toolbar | none | Optional. Use group with aria-label to name a set of related controls. toolbar implies arrow-key navigation, which the application must implement; Forma does not. |
aria-label | .forma-cluster | string | — | Names the group when a role is present. |
style | .forma-cluster | --forma-cluster-space: <length> | — | Inline override of the cluster gap for one instance. |
data-density | surrounding .forma-stack | relaxed | standard | compact | analytical | — | Appears on the surrounding stack in the metadata example. It does not change the cluster gap. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-cluster | Block class | — | Wrapping flex row with centered cross-axis alignment and one gap for items and lines. |
--forma-cluster-gap | Custom property | — | Foundation-layer gap variable. The component layer sets the gap from --forma-cluster-space, so setting this alone has no visible effect. |
--forma-cluster-space | Custom property | default var(--forma-primitive-spacing-3, 0.75rem) | Gap between items and between wrapped lines. Default --forma-primitive-spacing-3 (0.75rem). This is the effective gap. |
| Keys | Result |
|---|---|
| Tab / Shift+Tab | Moves through focusable items in source order, which matches the wrapped visual order. |
| Arrow keys | No built-in behavior. If the cluster is marked role="toolbar", the application must implement roving focus. |
Not a form control. Buttons inside a cluster submit or reset their form as usual.
| State | How it is expressed | Presentation |
|---|---|---|
| Single line | items fit the inline size | All items share one line, centered on the cross axis. |
| Wrapped | items exceed the inline size | Items continue on following lines in source order, separated by the same gap. |
flex-wrap; there are no breakpoints.overflow-wrap: anywhere on text elements.--forma-cluster-gap and expecting it to change spacing; use --forma-cluster-space.Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.