An emphasis budget is a declared limit on visual competition within one decision region. The root carries data-emphasis-budget="one-primary", and each direct region claims data-emphasis="primary", "secondary" or "supporting". Exactly one direct region may be primary. Forma draws three clearly different weights (a framed primary, a secondary with an inline-start rule, supporting items with a thin top rule) and pairs each with a visible .forma-emphasis-label, so the level stays readable with color, borders and tint removed. The budget is checked by tests and review, not enforced by CSS, and the application decides which content deserves each level.
Use when
A consequential decision screen has several regions that could all look important, and one must clearly lead.
Teams want a reviewable, testable rule that stops every panel from being styled as primary.
Nested areas of a page are independent decisions that each need their own single primary.
Avoid when
The concern is reading order across steps rather than emphasis weight: use Attention path.
The flow is recognize, verify, act before a transition: use Verification frame.
Only layout width should favor one item: use Priority stack.
The content is a status message: use Alert or Callout.
Behavior to know
Primary: 2px functional border, surface background and full padding.
Secondary: 0.2rem inline-start rule and lighter padding.
Supporting: thin top rule, laid out in an auto-fit grid via .forma-emphasis-budget__support.
Every level carries a visible text label, so emphasis survives grayscale and forced colors.
Nested budgets are allowed and are evaluated separately, against their own direct children.
Basic example
The smallest correct markup: the canonical pattern from patterns/emphasis-budget.html inside its public tag. Copy this first, then adapt labels, names and state. This component owns a page's main landmark, so it renders in its own document below.
Canonical
Minimal emphasis budget
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 controls are shown for their markup and appearance and cannot be operated here.
<forma-emphasis-budget class="forma-component-tag">
<main class="forma-emphasis-budget" data-emphasis-budget="one-primary" aria-labelledby="emphasis-budget-title">
<header>
<p class="forma-component-kicker">Deployment review</p>
<h2 id="emphasis-budget-title">Release decision</h2>
</header>
<section data-emphasis="primary" aria-labelledby="emphasis-primary">\n <p class="forma-emphasis-label">Primary</p>
<span class="forma-status-lozenge" data-state="unknown">Unknown consumer outcome</span>
<h3 id="emphasis-primary">Reconcile before publishing</h3>
<p>The consuming application has not supplied current verification evidence.</p>
<button type="button">Reconcile consumer</button>
</section>
<section data-emphasis="secondary" aria-labelledby="emphasis-secondary">\n <p class="forma-emphasis-label">Secondary</p>
<h3 id="emphasis-secondary">Verification evidence</h3>
<p>Package build and repository checks passed. Consumer verification remains unresolved.</p>
</section>
<div class="forma-emphasis-budget__support">
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>History</h3><p>The previous release completed successfully.</p></section>
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>Package</h3><p>Version 1.4.0 with provenance enabled.</p></section>
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>Activity</h3><p>Recent repository work includes presentation and browser-test changes.</p></section>
</div>
</main>
</forma-emphasis-budget>
Click or tap the code once to select all of it, then copy.
Examples
Scenario
Access request decision
A single budget for an access request: the primary region holds the decision, the secondary region the requester's justification, and three supporting facts sit in the support grid. Only the primary region contains actions.
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.
Access requests
Production database access
Primary
Grant read access to prod-billing for 8 hours?
Requested by Luis Ferreira for incident INC-3312.
Secondary
Justification
Needs to confirm whether duplicate invoices were written during the 09:12 outage.
Supporting
Previous grants
2 in the last 90 days, both expired normally.
Supporting
Scope
Read only. No export permission.
Supporting
Policy
Production access needs one approver from Platform.
<forma-emphasis-budget class="forma-component-tag">
<section class="forma-emphasis-budget" data-emphasis-budget="one-primary" aria-labelledby="emphasis-budget-access-request-title">
<header>
<p class="forma-component-kicker">Access requests</p>
<h2 id="emphasis-budget-access-request-title">Production database access</h2>
</header>
<section data-emphasis="primary" aria-labelledby="emphasis-budget-access-request-primary">
<p class="forma-emphasis-label">Primary</p>
<h3 id="emphasis-budget-access-request-primary">Grant read access to prod-billing for 8 hours?</h3>
<p>Requested by Luis Ferreira for incident INC-3312.</p>
<div class="forma-cluster"><button type="button">Grant for 8 hours</button><button type="button">Decline</button></div>
</section>
<section data-emphasis="secondary" aria-labelledby="emphasis-budget-access-request-secondary">
<p class="forma-emphasis-label">Secondary</p>
<h3 id="emphasis-budget-access-request-secondary">Justification</h3>
<p>Needs to confirm whether duplicate invoices were written during the 09:12 outage.</p>
</section>
<div class="forma-emphasis-budget__support">
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>Previous grants</h3><p>2 in the last 90 days, both expired normally.</p></section>
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>Scope</h3><p>Read only. No export permission.</p></section>
<section data-emphasis="supporting"><p class="forma-emphasis-label">Supporting</p><h3>Policy</h3><p>Production access needs one approver from Platform.</p></section>
</div>
</section>
</forma-emphasis-budget>
Click or tap the code once to select all of it, then copy.
Scenario
Nested independent budgets
The page-level decision has one primary region. A supporting region contains its own independent budget, with its own single primary for a separate sub-decision. Each budget is counted against its direct children only, so this is valid.
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.
Quarter close
Primary
Insufficient data
Close Q3 once the EMEA ledger reports
The EMEA ledger has not supplied September totals. Closing now would record an incomplete quarter.
Supporting
EMEA ledger
Primary
Request the September totals from the EMEA controller.
<forma-emphasis-budget class="forma-component-tag">
<section class="forma-emphasis-budget" data-emphasis-budget="one-primary" aria-labelledby="emphasis-budget-nested-title">
<h2 id="emphasis-budget-nested-title">Quarter close</h2>
<section data-emphasis="primary" aria-labelledby="emphasis-budget-nested-primary">
<p class="forma-emphasis-label">Primary</p>
<span class="forma-status-lozenge" data-state="unknown">Insufficient data</span>
<h3 id="emphasis-budget-nested-primary">Close Q3 once the EMEA ledger reports</h3>
<p>The EMEA ledger has not supplied September totals. Closing now would record an incomplete quarter.</p>
</section>
<section data-emphasis="supporting" aria-labelledby="emphasis-budget-nested-sub">
<p class="forma-emphasis-label">Supporting</p>
<h3 id="emphasis-budget-nested-sub">EMEA ledger</h3>
<div class="forma-emphasis-budget" data-emphasis-budget="one-primary">
<section data-emphasis="primary"><p class="forma-emphasis-label">Primary</p><p>Request the September totals from the EMEA controller.</p><button type="button">Send request</button></section>
<section data-emphasis="secondary"><p class="forma-emphasis-label">Secondary</p><p>Last report received 3 October.</p></section>
</div>
</section>
</section>
</forma-emphasis-budget>
Click or tap the code once to select all of it, then copy.
Mobile
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.
Mobile example
Mobile decision
At phone width all levels stack in source order and the primary action becomes a wrapping, full-height button.
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.
Frames narrower than the selected width show the component at the width available.
What changes at narrow widths
The support grid uses minmax(min(100%, 15rem), 1fr), so supporting regions stack into one column on phones.
At 30rem and below a button directly inside the primary region wraps its text and grows in height while keeping a 2.75rem minimum.
Status lozenges inside the budget wrap at 30rem and below instead of widening the page.
Every region and label wraps with overflow-wrap: anywhere, so long identifiers and 200% text stay within 320px in any orientation.
Click or tap the code once to select all of it, then copy.
Baseline
Mobile · 320px
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 controls are shown for their markup and appearance and cannot be operated here.
Frames narrower than the selected width show the component at the width available.
API and configuration
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.
Native and ARIA attributes
Attribute
On
Values
Default
Description
data-emphasis-budget
root
one-primary
absent
Declares the budget: exactly one direct child region may claim primary. Checked by tests and review; CSS does not enforce it.
data-emphasis
regions inside the budget
primary | secondary | supporting
absent
The region's claimed emphasis level. Chosen by the application from domain state; never implies severity, authority or legality.
aria-labelledby
root and regions
id of a heading
—
Names the budget and its main regions by their headings.
data-state
.forma-status-lozenge
ok | attention | blocked | unknown
absent
Adds a status symbol to a text status inside a region.
CSS hooks (derived from dist/all.css)
Hook
Kind
Values or default
Description
.forma-emphasis-budget
Block class
—
Root grid. Styles any descendant [data-emphasis] region by its level; can be nested for independent sub-decisions.
.forma-emphasis-budget__support
Element class
—
Auto-fit grid (regions at least 15rem) for supporting regions.
.forma-emphasis-label
Block class
—
Small mono uppercase text label stating the region's level. Place it as the first child of each region so the level survives visual-channel removal.
[data-emphasis]
Attribute hook
—
Level hook read by the CSS: primary (framed), secondary (inline-start rule), supporting (top rule).
[data-emphasis-budget]
Attribute hook
—
Declarative budget marker read by conformance tests; it has no styling.
Keyboard interaction
Keys
Result
Tab / Shift+Tab
Moves through actions in source order. Emphasis never changes focus order.
Form behavior
Not a form control.
States
Emphasis budget states
State
How it is expressed
Presentation
Primary
data-emphasis="primary"
2px border, surface background, full padding.
Secondary
data-emphasis="secondary"
0.2rem inline-start rule, lighter padding.
Supporting
data-emphasis="supporting"
Thin top rule and small block padding.
Forced colors
@media (forced-colors: active)
All levels use CanvasText borders on Canvas; the text labels distinguish them.
Accessibility
Forma provides
Gives each level a distinct structural treatment (frame, side rule, top rule) rather than a color difference.
Provides a text label class so the level is readable in grayscale, forced colors and with borders removed.
Wraps text anywhere and keeps regions within 100% width at 320px and 200% text.
Your application supplies
Put exactly one primary among the direct regions of each budget.
Include an .forma-emphasis-label in every region; do not rely on the frame alone.
Keep headings, text states and source order correct; emphasis does not replace them.
Derive emphasis from application state, and never use it to express severity, permission or legality.
Responsive behavior
Root, regions and support grid set min-inline-size: 0 and max-inline-size: 100%; every [data-emphasis] region wraps anywhere.
Support grid: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)), one column on phones.
At 30rem and below: status lozenges wrap, and a button directly inside the primary region wraps and grows in height.
Motion
No animation: emphasis is expressed only through static structure and text. Nothing pulses, moves or fades to claim attention.
Usage guidance
Do
Start a new nested budget when a sub-area is a genuinely separate decision.
Keep the primary region focused on the single decision or action that matters now.
Avoid
Making two direct regions primary because both feel important; demote one to secondary.
Styling your own "extra primary" regions outside the budget to work around it.