Git hosting
Deploy on every merge to main.
<forma-container>
Marketing-layer width container (narrow, default, wide, max) with a breakout escape for full-bleed media.
<forma-container>patterns/container.htmlA container centers a region and caps its width at one of four token-defined sizes: narrow (45rem) for reading, standard (64rem, the default) for mixed content, wide (75rem) for grids, and max (90rem) for the full page frame. The page background and any tonal band stay full width while the content inside lines up on a shared set of widths. forma-breakout is the companion for regions that should use the full available width, such as a wide figure or table placed between narrow text containers. Both are marketing-layer primitives whose widths come from the site's layout role tokens, so place them inside .forma-site.
min(100%, var(--forma-container-width)), centered with automatic inline margins..forma-site__main in the Marketing shell.forma-breakout widens only relative to its own parent: use it as a sibling of containers, not inside one.The smallest correct markup: the canonical pattern from patterns/container.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Narrow containers keep reading-focused regions at a comfortable measure while the page background stays full width.
<forma-container class="forma-component-tag">
<div class="forma-site">
<div class="forma-container" data-forma-width="narrow">
<h2>Privacy notice</h2>
<p>Narrow containers keep reading-focused regions at a comfortable measure while the page background stays full width.</p>
</div>
</div>
</forma-container>
Click or tap the code once to select all of it, then copy.
Two narrow containers of reading text with an forma-breakout figure between them. The figure spans the full available width while the text keeps its reading width, and all three share one source order.
Every write is committed in the primary zone and then copied to two others before it is acknowledged.
If a zone is lost, the remaining two continue serving reads and writes without a manual failover.
<forma-container class="forma-component-tag">
<div class="forma-site">
<div class="forma-container" data-forma-width="narrow">
<h2>How replication works</h2>
<p>Every write is committed in the primary zone and then copied to two others before it is acknowledged.</p>
</div>
<figure class="forma-breakout forma-frame" style="--forma-frame-ratio: 3 / 1">
<div class="forma-frame__media"><img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1500' height='500'%3E%3Crect width='100%25' height='100%25' fill='%23c9c4b8'/%3E%3C/svg%3E" alt="Diagram of three availability zones connected in a ring"></div>
<figcaption>Writes travel around the ring before acknowledgement.</figcaption>
</figure>
<div class="forma-container" data-forma-width="narrow">
<p>If a zone is lost, the remaining two continue serving reads and writes without a manual failover.</p>
</div>
</div>
</forma-container>
Click or tap the code once to select all of it, then copy.
A data-forma-width="wide" container holding a card grid. The grid gets more columns than a standard container would allow while staying aligned with other wide regions on the page.
Deploy on every merge to main.
Post deploy results to a channel.
Link releases to resolved issues.
<forma-container class="forma-component-tag">
<div class="forma-site">
<div class="forma-container" data-forma-width="wide">
<ul class="forma-card-grid" data-forma-columns="3" aria-label="Integrations">
<li><article class="forma-card"><h2 class="forma-card__title">Git hosting</h2><p>Deploy on every merge to main.</p></article></li>
<li><article class="forma-card"><h2 class="forma-card__title">Chat</h2><p>Post deploy results to a channel.</p></article></li>
<li><article class="forma-card"><h2 class="forma-card__title">Issue tracker</h2><p>Link releases to resolved issues.</p></article></li>
</ul>
</div>
</div>
</forma-container>
Click or tap the code once to select all of it, then copy.
A form container narrower than the narrow preset, set with --forma-container-width: 28rem. It stays centered and still shrinks to 100% on small screens.
Static specimen. Submitting or resetting it needs the consuming application's form handling, which this documentation does not have. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-container class="forma-component-tag">
<div class="forma-site">
<form class="forma-container forma-stack" style="--forma-container-width: 28rem" aria-labelledby="container-custom-width-title">
<h2 id="container-custom-width-title">Join the beta</h2>
<div class="forma-field">
<label class="forma-field__label" for="container-custom-width-email">Work email</label>
<input id="container-custom-width-email" name="email" type="email" autocomplete="email" required>
</div>
<div class="forma-cluster"><button type="submit">Request access</button></div>
</form>
</div>
</forma-container>
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.
Narrow and standard containers at phone width. Every preset is wider than the screen, so each resolves to 100% and the page gutter alone controls the edges.
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.
min(100%, …) makes every container full width..forma-site__main in a full page (the preview here has none).forma-breakout is also 100% on phones, so wide figures fall back to the column width; put wide tables in Bounded overflow.<forma-container class="forma-component-tag">
<div class="forma-site">
<div class="forma-container" data-forma-width="narrow">
<h2>Terms of service</h2>
<p>These terms apply to every workspace created after 1 September 2026.</p>
</div>
<div class="forma-container">
<p><a href="#previous-terms">Read the previous terms</a></p>
</div>
</div>
</forma-container>
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 |
|---|---|---|---|---|
data-forma-width | .forma-container | narrow | wide | max | absent (standard, 64rem) | Selects a width preset from the layout role tokens. |
style | .forma-container / .forma-breakout | --forma-container-width / --forma-breakout-max / --forma-frame-ratio | — | Per-instance width override, or the frame ratio in the figure example. |
aria-labelledby | form | id of the heading | — | Names the sign-up form by its heading. |
data-forma-columns | .forma-card-grid | 3 | — | Card grid column preference, used in the wide container example. |
aria-label | .forma-card-grid | string | — | Names the card collection. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-container | Block class | — | Centered region capped at --forma-container-width (falls back to --forma-layout-width-standard). |
[data-forma-width] | Attribute hook | "max", "narrow", "wide" | narrow = --forma-layout-width-narrow (45rem), wide = --forma-layout-width-wide (75rem), max = --forma-layout-width-max (90rem). |
--forma-container-width | Custom property | default var(--forma-layout-width-narrow) | Maximum width of the container. Set by data-forma-width, or directly for a custom width. |
.forma-breakout | Block class | — | Region at min(100%, --forma-breakout-max) with max-inline-size: none. Not centered by itself; place it directly in the page's main region beside containers. |
--forma-breakout-max | Custom property | — | Maximum width of a breakout region. Default 90rem. |
--forma-layout-width-standard | Custom property | — | Site role token for the default container width (64rem by default); themes may retarget it. |
Not a form control. A form can be a container.
No keyboard interaction beyond the browser defaults for the elements in the markup.
| State | How it is expressed | Presentation |
|---|---|---|
| Standard | no data-forma-width | Capped at 64rem and centered. |
| Narrow / wide / max | data-forma-width | Capped at 45rem, 75rem or 90rem and centered. |
| Fluid | parent narrower than the cap | 100% of the parent. |
min(100%, cap), so presets collapse to full width on narrow screens without breakpoints.forma-breakout does not escape an ancestor container; it is only as wide as its parent allows.--forma-container-width instead.forma-breakout inside a narrow container and expecting it to widen.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.