VERIFICATION-0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
Billing contact · Extended localized content for verification and layout resilience
Invoices are sent to the finance team on the first business day of each month.
<forma-surface>
A bounded panel with secondary surface tone, border and padding for grouping related content without inventing semantics.
<forma-surface>patterns/surface.htmlA surface is a panel: secondary background, a subtle border and even padding around related content. It says "these things belong together" through enclosure while adding no role, heading or behavior; the element you put it on supplies the semantics (section, article, li, aside, form). Headings and paragraphs inside inherit the surface's text color so contrast stays correct on the secondary tone. Surfaces are the usual items of grids and the regions of sidebars and rails.
min-inline-size: 0, so a surface can shrink inside grid and flex tracks and its content wraps.The smallest correct markup: the canonical pattern from patterns/surface.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Invoices are sent to the finance team on the first business day of each month.
<forma-surface class="forma-component-tag">
<section class="forma-surface" aria-labelledby="surface-title">
<h2 id="surface-title">Billing contact</h2>
<p>Invoices are sent to the finance team on the first business day of each month.</p>
</section>
</forma-surface>
Click or tap the code once to select all of it, then copy.
A surface on a section groups a heading, key facts and an action. The section supplies the landmark semantics and the surface supplies the boundary.
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-surface class="forma-component-tag">
<section class="forma-surface forma-stack" aria-labelledby="surface-billing-summary-title">
<h2 id="surface-billing-summary-title">Current plan</h2>
<dl class="forma-key-value-list">
<div><dt>Plan</dt><dd>Team, 25 seats</dd></div>
<div><dt>Next invoice</dt><dd><time datetime="2026-10-01">1 October 2026</time>, $1,250.00</dd></div>
<div><dt>Payment method</dt><dd>Visa ending 4242</dd></div>
</dl>
<div class="forma-cluster"><button type="button">Change plan</button></div>
</section>
</forma-surface>
Click or tap the code once to select all of it, then copy.
Surfaces as list items with reduced padding (--forma-surface-space: 0.75rem). The border keeps adjacent items distinct even with a tight gap.
<forma-surface class="forma-component-tag">
<ul class="forma-stack" data-density="compact" aria-label="Pending approvals">
<li class="forma-surface" style="--forma-surface-space: 0.75rem"><strong>Expense report EX-4410</strong> · Travel to Lisbon · $840.20</li>
<li class="forma-surface" style="--forma-surface-space: 0.75rem"><strong>Purchase order PO-1188</strong> · Laptop replacements · $6,300.00</li>
<li class="forma-surface" style="--forma-surface-space: 0.75rem"><strong>Contract CN-207</strong> · Cleaning services renewal · $12,000.00</li>
</ul>
</forma-surface>
Click or tap the code once to select all of it, then copy.
A surface holding an empty result message and the action that resolves it. The panel keeps the empty region visibly bounded so it is not mistaken for missing page content.
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.
No reports are scheduled. Scheduled reports are emailed to you as PDF files.
<forma-surface class="forma-component-tag">
<section class="forma-surface forma-stack" aria-labelledby="surface-nested-content-title">
<h2 id="surface-nested-content-title">Scheduled reports</h2>
<p>No reports are scheduled. Scheduled reports are emailed to you as PDF files.</p>
<div class="forma-cluster"><button type="button">Schedule a report</button></div>
</section>
</forma-surface>
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.
A surface at phone width with a long unbroken reference value. The panel fills the column and the value wraps inside the padding.
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.
overflow-wrap: anywhere on text and the surface has min-inline-size: 0.<forma-surface class="forma-component-tag">
<section class="forma-surface forma-stack" aria-labelledby="surface-mobile-panel-title">
<h2 id="surface-mobile-panel-title">Webhook endpoint</h2>
<p>https://hooks.example.com/services/T024BE7LD/B06Q8K3N1RX/9f8a7b6c5d4e3f2a1b0c</p>
<div class="forma-cluster"><button type="button">Send test event</button></div>
</section>
</forma-surface>
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.
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-labelledby | section / article | id of the panel heading | — | Names a surface that is a landmark or named region. |
aria-label | list | string | — | Names a list of surfaces. |
style | .forma-surface | --forma-surface-space: <length> | — | Per-instance padding override. |
data-density | surrounding .forma-stack | compact | — | Used on the stack that spaces surfaces in the dense list example; it does not change surface padding. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-surface | Block class | — | Panel with secondary surface background, on-secondary text color, subtle 1px border and padding. Headings and paragraphs inside inherit its color. |
--forma-surface-accent-text-color | Custom property | default var(--forma-color-text-primary, #161616) | Color of links and accent labels inside a secondary surface. Every rule that paints the secondary surface sets it to --forma-color-text-primary and rebinds secondary and muted text to --forma-color-text-on-secondary-surface, because accent and secondary text are not AA-validated on that surface. Outside one, they use their accent role. |
--forma-surface-space | Custom property | — | Padding on all sides. Default --forma-primitive-spacing-5 (1.5rem). |
Not a form control. A form can be a surface.
No keyboard interaction beyond the browser defaults for the elements in the markup.
| State | How it is expressed | Presentation |
|---|---|---|
| Default | .forma-surface | Secondary tone, subtle border, 1.5rem padding. |
| Forced colors | @media (forced-colors: active) | Border becomes CanvasText and the background resolves to Canvas, so the boundary stays visible. |
min-inline-size: 0 lets surfaces shrink inside grids and flex rows, so long content wraps instead of overflowing.--forma-surface-space for dense contexts.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.