Workspaces and shells

Focus stage

<forma-focus-stage>

Dominant primary work surface with subordinate supporting context that stacks without semantic reordering.

Authoring tag
<forma-focus-stage>
Behavior owner
Application content
Canonical source
patterns/focus-stage.html

Purpose

A focus stage gives one piece of work all the available space and puts supporting context, such as an inspector, checklist or reference, in a bounded column beside it. The support column has a fixed range (14rem to 20rem by default), so the primary surface grows with the window while the support stays readable but never competes. On narrow screens the support stacks after the primary work in source order. Forma owns the proportions and the stacking; what the support column contains and when it changes is application content.

Use when

  • A single artifact is the object of work, such as a document, a design, a form or a report, and supporting controls are secondary.
  • The support column should keep a readable width regardless of how wide the window is.
  • Attention should land on the primary surface first at every width.

Avoid when

  • Both regions are equally important or the proportion is roughly two to one: use Split pane.
  • The support column should sit at the start (left in LTR): use Rail or Sidebar.
  • Users need to resize the regions: use Resizable split pane.
  • The screen also needs navigation and a status landmark: use Workspace shell.

Behavior to know

  • Tracks are minmax(0, 1fr) and var(--forma-focus-stage-support), so the primary surface takes every extra pixel.
  • Both children set min-inline-size: 0 and align to the top.
  • At 48rem and below the stage is one column, primary first.

Basic example

The smallest correct markup: the canonical pattern from patterns/focus-stage.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 focus stage

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.

HTML · Minimal focus stage Raw HTML for HTML · Minimal focus stage
<forma-focus-stage class="forma-component-tag">
<section class="forma-focus-stage" aria-label="Focused work">
  <main class="forma-focus-stage__primary forma-surface"><h2>Primary artifact</h2><p>The dominant work surface receives available space.</p></main>
  <aside class="forma-focus-stage__support forma-stack"><h2>Inspector</h2><label>Title <input value="Primary artifact"></label><button type="button">Apply</button></aside>
</section>
</forma-focus-stage>

Click or tap the code once to select all of it, then copy.

Examples

Scenario

Article editor with publishing checklist

The article body is the dominant surface; a readiness checklist and the publish action sit in the support column. The support column is labelled so it can be reached as a landmark.

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.

Why we moved billing to event sourcing

Two years ago our invoices were computed from a mutable ledger. Every correction overwrote history, and every audit started with a reconstruction.

HTML · Article editor with publishing checklist Raw HTML for HTML · Article editor with publishing checklist
<forma-focus-stage class="forma-component-tag">
  <section class="forma-focus-stage" aria-label="Edit article">
    <article class="forma-focus-stage__primary forma-surface" aria-labelledby="focus-stage-article-editor-title">
      <h2 id="focus-stage-article-editor-title">Why we moved billing to event sourcing</h2>
      <p>Two years ago our invoices were computed from a mutable ledger. Every correction overwrote history, and every audit started with a reconstruction.</p>
    </article>
    <aside class="forma-focus-stage__support forma-stack" aria-labelledby="focus-stage-article-editor-support">
      <h3 id="focus-stage-article-editor-support">Before publishing</h3>
      <ul>
        <li>Summary written</li>
        <li>Cover image missing</li>
        <li>Reviewer: not assigned</li>
      </ul>
      <button type="button">Request review</button>
    </aside>
  </section>
</forma-focus-stage>

Click or tap the code once to select all of it, then copy.

Scenario

Compact support column

The support track is narrowed with --forma-focus-stage-support and the gap tightened with --forma-focus-stage-space, for a dense review screen where the support holds only a few properties.

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.

Site photo 14 · north fence line

Photo shows a 2 m gap in the perimeter fence beside gate 3, with fresh tyre tracks on the inside.

HTML · Compact support column Raw HTML for HTML · Compact support column
<forma-focus-stage class="forma-component-tag">
  <section class="forma-focus-stage" aria-label="Review site photo" style="--forma-focus-stage-support: minmax(10rem, 13rem); --forma-focus-stage-space: 0.75rem">
    <article class="forma-focus-stage__primary forma-surface" aria-labelledby="focus-stage-narrow-support-title">
      <h2 id="focus-stage-narrow-support-title">Site photo 14 · north fence line</h2>
      <p>Photo shows a 2 m gap in the perimeter fence beside gate 3, with fresh tyre tracks on the inside.</p>
    </article>
    <aside class="forma-focus-stage__support forma-stack" aria-labelledby="focus-stage-narrow-support-props">
      <h3 id="focus-stage-narrow-support-props">Photo details</h3>
      <p>Taken 2 Oct, 10:14 by M. Chen.</p>
      <button type="button">Flag for repair</button>
    </aside>
  </section>
</forma-focus-stage>

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 stacked support

At phone width the support column moves below the primary work, keeping the form first in both reading and focus order.

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.

Viewport width

Frames narrower than the selected width show the component at the width available.

What changes at narrow widths

  • At 48rem and below the stage is a single minmax(0, 1fr) column; the 14rem support minimum no longer applies and nothing overflows at 320px.
  • The support region appears after the primary region, matching source order; do not place the only submit action in the support column.
  • Form controls in either region keep the 2.75rem minimum height from Forma's base styles.
  • Landscape tablets above 48rem restore the side column without changing focus order.
HTML · Mobile stacked support Raw HTML for HTML · Mobile stacked support
<forma-focus-stage class="forma-component-tag">
  <section class="forma-focus-stage" aria-label="Expense claim">
    <form class="forma-focus-stage__primary forma-stack" aria-labelledby="focus-stage-mobile-title">
      <h2 id="focus-stage-mobile-title">New expense</h2>
      <label for="focus-stage-mobile-amount">Amount</label>
      <input id="focus-stage-mobile-amount" name="amount" inputmode="decimal">
      <button type="submit">Submit claim</button>
    </form>
    <aside class="forma-focus-stage__support" aria-labelledby="focus-stage-mobile-support">
      <h3 id="focus-stage-mobile-support">Policy</h3>
      <p>Meals over $75 need an itemized receipt.</p>
    </aside>
  </section>
</forma-focus-stage>

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.

Viewport width

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
AttributeOnValuesDefaultDescription
aria-labelroot, support asidestring—Names the stage and the support landmark when they have no visible heading.
aria-labelledbyprimary and support regionsid of a visible heading—Names each region by its heading.
styleroot--forma-focus-stage-support, --forma-focus-stage-space—Per-instance override of the support track and gap.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-focus-stageBlock class—Root two-column grid: flexible primary track and bounded support track.
.forma-focus-stage__primaryElement class—The dominant work surface. Often combined with forma-surface.
.forma-focus-stage__supportElement class—The subordinate context column. Often combined with forma-stack.
--forma-focus-stage-spaceCustom propertydefault var(--forma-primitive-spacing-5, 1.5rem)Gap between primary and support. Default the 1.5rem spacing token.
--forma-focus-stage-supportCustom propertydefault minmax(14rem, 20rem)Support track size. Default minmax(14rem, 20rem).
Keyboard interaction
KeysResult
Tab / Shift+TabMoves through the primary region first, then the support region. No added keyboard behavior.

Form behavior

Not a form control. Either region may be a form.

States

Focus stage states
StateHow it is expressedPresentation
Stagedviewport wider than 48remPrimary surface fills available space; support column stays between its minimum and maximum.
Stacked@media (max-width: 48rem)One column, primary first.

Accessibility

Forma provides

  • Never reorders primary and support; visual, reading and focus order stay aligned.
  • Allows both regions to shrink so content reflows at 320px and high zoom.

Your application supplies

  • Put the primary work first in the source and give each region a heading or name.
  • Use main for the primary region only when the stage is the page's main content and there is no other main.
  • Keep essential actions reachable from the primary region; the support column is after it on phones.

Responsive behavior

  • Wide: minmax(0, 1fr) var(--forma-focus-stage-support); extra width always goes to the primary surface.
  • At 48rem and below: a single column.
  • The breakpoint is viewport-based; inside a narrow container on a wide screen the support column still takes at least 14rem, so lower --forma-focus-stage-support there.

Motion

  • No animation: the layout changes instantly at the breakpoint and nothing moves when support content changes.

Usage guidance

Do

  • Keep the support column short and scannable: properties, checklists, one or two actions.
  • Use the custom properties to tune proportions instead of new grid CSS.

Avoid

  • Placing a second primary task in the support column.
  • Letting the support column grow long enough that phone users must scroll past it to reach the next page section.

Verification specimens

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.