INV-1042
- Customer
- Acme Manufacturing
- Outstanding
- $5,000
- Due
- October 4, 2026
<forma-master-detail>
List-and-detail composition that collapses cleanly from multi-pane desktop to mobile navigation.
<forma-master-detail>patterns/master-detail.htmlA master/detail workspace shows a list of records beside the full detail of one selected record. The list is a nav of real links, so selecting a record is navigation to a URL the application owns, and the current record is marked with aria-current="page". Forma draws the two-column frame, the selected-row cue and the narrow-screen recomposition into a horizontal record switcher above the detail. Selection, routing, browser history, loading and focus restoration are application or Limen behavior.
The smallest correct markup: the canonical pattern from patterns/master-detail.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
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-master-detail class="forma-component-tag">
<section class="forma-master-detail" aria-label="Record workspace">
<nav class="forma-master-detail__master" aria-label="Records">
<a href="#record-1" aria-current="page"><strong>INV-1042</strong><span>Acme Manufacturing</span></a>
<a href="#record-2"><strong>INV-1043</strong><span>Northstar Labs</span></a>
<a href="#record-3"><strong>INV-1044</strong><span>Atlas Works</span></a>
</nav>
<article class="forma-master-detail__detail" id="record-1">
<span class="forma-status-lozenge" data-state="attention">Overdue</span>
<h3>INV-1042</h3>
<dl class="forma-key-value-list">
<div><dt>Customer</dt><dd>Acme Manufacturing</dd></div>
<div><dt>Outstanding</dt><dd>$5,000</dd></div>
<div><dt>Due</dt><dd>October 4, 2026</dd></div>
</dl>
</article>
</section>
</forma-master-detail>
Click or tap the code once to select all of it, then copy.
The first visit to the list before any record is chosen. No row carries aria-current, and the detail region says what to do instead of showing stale data from a previous record.
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.
Choose a case from the list to see the customer, history and next steps.
<forma-master-detail class="forma-component-tag">
<section class="forma-master-detail" aria-label="Open support cases">
<nav class="forma-master-detail__master" aria-label="Cases">
<a href="#master-detail-nothing-selected-4410"><strong>CASE-4410</strong><span>Login loop after SSO change</span></a>
<a href="#master-detail-nothing-selected-4407"><strong>CASE-4407</strong><span>Refund not received</span></a>
<a href="#master-detail-nothing-selected-4399"><strong>CASE-4399</strong><span>Export missing columns</span></a>
</nav>
<section class="forma-master-detail__detail" aria-labelledby="master-detail-nothing-selected-title">
<h3 id="master-detail-nothing-selected-title">No case selected</h3>
<p>Choose a case from the list to see the customer, history and next steps.</p>
</section>
</section>
</forma-master-detail>
Click or tap the code once to select all of it, then copy.
A selected record in a blocked state, with long customer names wrapping inside the list rows. Status is a text lozenge with a symbol, and the only legal action shown is the one the application allows.
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-master-detail class="forma-component-tag">
<section class="forma-master-detail" aria-label="Purchase orders">
<nav class="forma-master-detail__master" aria-label="Purchase orders list">
<a href="#master-detail-blocked-record-7781"><strong>PO-7781</strong><span>Consolidated Freight & Warehousing Partners (EMEA)</span></a>
<a href="#master-detail-blocked-record-7782" aria-current="page"><strong>PO-7782</strong><span>Hanseatische Maschinenbau- und Anlagentechnik GmbH</span></a>
<a href="#master-detail-blocked-record-7790"><strong>PO-7790</strong><span>Blue Harbor Co.</span></a>
</nav>
<article class="forma-master-detail__detail" id="master-detail-blocked-record-7782" aria-labelledby="master-detail-blocked-record-title">
<span class="forma-status-lozenge" data-state="blocked">Blocked</span>
<h3 id="master-detail-blocked-record-title">PO-7782</h3>
<dl class="forma-key-value-list">
<div><dt>Supplier</dt><dd>Hanseatische Maschinenbau- und Anlagentechnik GmbH</dd></div>
<div><dt>Blocked by</dt><dd>Missing tax certificate</dd></div>
<div><dt>Amount</dt><dd>€48,200.00</dd></div>
</dl>
<p><button type="button">Request certificate</button></p>
</article>
</section>
</forma-master-detail>
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.
At phone width the list becomes a horizontal switcher above the detail, and the selected record's detail follows directly underneath.
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-master-detail class="forma-component-tag">
<section class="forma-master-detail" aria-label="Field visits">
<nav class="forma-master-detail__master" aria-label="Visits">
<a href="#master-detail-mobile-v12" aria-current="page"><strong>Visit 12</strong><span>Pump station 4</span></a>
<a href="#master-detail-mobile-v13"><strong>Visit 13</strong><span>North reservoir</span></a>
<a href="#master-detail-mobile-v14"><strong>Visit 14</strong><span>Valve house B</span></a>
</nav>
<article class="forma-master-detail__detail" id="master-detail-mobile-v12" aria-labelledby="master-detail-mobile-title">
<span class="forma-status-lozenge" data-state="ok">Complete</span>
<h3 id="master-detail-mobile-title">Visit 12</h3>
<dl class="forma-key-value-list">
<div><dt>Site</dt><dd>Pump station 4</dd></div>
<div><dt>Inspector</dt><dd>Daniel Okafor</dd></div>
</dl>
</article>
</section>
</forma-master-detail>
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 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 |
|---|---|---|---|---|
aria-label | section, nav | string | — | Names the workspace and the record list so the list landmark is distinguishable from site navigation. |
aria-current | list link | page | absent | Marks the selected record and draws the selected-row cue. Set by the application when the route changes. |
href | list link | record URL | — | Each record is a real link so it can be opened, bookmarked and restored with browser history. |
id | detail | string | — | Optional fragment target for the selected record. |
aria-labelledby | detail | id of the detail heading | — | Names the detail region by its record heading. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-master-detail | Block class | — | Root two-column grid with a border and a 22rem minimum height. |
.forma-master-detail__detail | Element class | — | The selected record region. Padded and allowed to shrink. |
.forma-master-detail__master | Element class | — | The record list, normally a nav of links. Each direct link is a row; a span inside it is the secondary line. |
| Keys | Result |
|---|---|
| Tab / Shift+Tab | Moves through the record links, then into the detail. Native link behavior. |
| Enter | Follows the record link. The application loads the record and decides where focus goes. |
Not a form control.
| State | How it is expressed | Presentation |
|---|---|---|
| Selected record | aria-current="page" on the list link | Thick inline-start accent bar and filled row background. |
| Nothing selected | no link with aria-current | All rows neutral; the detail region should explain what to do. |
| Two columns | viewport wider than 40rem | List column minmax(12rem, 0.4fr) beside the detail. |
| Stacked switcher | @media (max-width: 40rem) | List becomes a horizontal scrolling row above the detail. |
nav a name that differs from other navigation on the page.minmax(12rem, 0.4fr) and a minmax(0, 1fr) detail column.overflow-x: auto inside its own box, bordered below instead of beside.min-inline-size: 0; long values wrap in Key-value list.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.