Site and editorial

Marketing shell

<forma-marketing-shell>

Reusable marketing-site frame: skip link, identity header with wrapping navigation, main content, and footer. Sites own content; the shell owns structure, focus, and responsive behavior.

Authoring tag
<forma-marketing-shell>
Behavior owner
Site content
Canonical source
patterns/marketing-shell.html

Purpose

The marketing shell is the .forma-site root that every marketing, product and documentation page starts from. It scopes the whole marketing layer (typography, link and focus treatment, surface tones, reduced motion) so that loading marketing CSS never restyles an application, and it fixes the page frame in source order: .forma-skip-link, header.forma-site-header, main.forma-site__main, footer.forma-site-footer. Sites supply content only; there is no runtime and no state beyond native focus and aria-current.

Use when

  • Building any page of a public marketing, product or documentation site that consumes a pinned Forma release.
  • Several sites must share one frame, focus treatment and responsive behavior without copying CSS.
  • A page needs surface tones (data-forma-tone) so text, links and rules stay legible on every background.

Avoid when

  • Building an authenticated application screen: use Workspace shell or Navigation shell, which own application regions and compact navigation.
  • Embedding one marketing component inside an application page. The marketing components need an .forma-site ancestor; put it on a bounded region, not around application UI.
  • A site needs more than about seven primary destinations: the navigation wraps to three or more lines (GAP-MKT-10). Reduce destinations or move them into the page.

Behavior to know

  • Marketing foundations apply only inside .forma-site; body.forma-site additionally fills the viewport and lets the footer sit at the bottom of short pages.
  • No CSS reordering: skip link, header, main and footer are read, tabbed and printed in source order at every width.
  • One focus treatment for the whole shell: a gap-colored outline inside a ring-colored halo, visible on page, surface, elevated and inverse tones.
  • data-forma-layout declares the page type (marketing, product, documentation) for identity retargets; it does not change layout by itself.

Basic example

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

Rendered from the canonical pattern file.

Live demo. 8 native actions work here and are verified by an outcome test.

HTML · Minimal marketing shell Raw HTML for HTML · Minimal marketing shell
<forma-marketing-shell class="forma-component-tag">
<div class="forma-site" data-forma-layout="marketing">
  <a class="forma-skip-link" href="#shell-main">Skip to main content</a>
  <header class="forma-site-header">
    <div class="forma-site-header__inner">
      <div class="forma-site-header__identity">
        <a class="forma-site-header__brand" href="#shell-main"><span class="forma-site-header__mark" aria-hidden="true">EX</span><span class="forma-site-header__name">Example / Product</span></a>
        <p class="forma-site-header__tagline">Evidence-driven engineering systems</p>
      </div>
      <nav class="forma-site-nav" aria-label="Primary">
        <ul class="forma-site-nav__list">
          <li><a class="forma-site-nav__link" href="#shell-main" aria-current="page">Overview</a></li>
          <li><a class="forma-site-nav__link" href="#shell-cta">Documentation</a></li>
          <li><a class="forma-site-nav__link" data-forma-variant="action" href="#shell-cta">Get started</a></li>
        </ul>
      </nav>
    </div>
  </header>
  <main class="forma-site__main" id="shell-main" tabindex="-1">
    <section class="forma-hero" aria-labelledby="shell-title">
      <div class="forma-hero__content">
        <p class="forma-eyebrow">Product overview</p>
        <h1 class="forma-hero__title" id="shell-title">A clear promise in one sentence</h1>
        <p class="forma-lead">Sites supply content. The shell supplies structure, rhythm, focus, and responsive behavior.</p>
        <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#shell-cta">Get started</a><a class="forma-button" href="#shell-cta">Read the documentation</a></div>
      </div>
    </section>
    <section class="forma-section" id="shell-cta" aria-labelledby="shell-cta-title">
      <div class="forma-cta">
        <div class="forma-cta__text"><h2 id="shell-cta-title">Start with a pinned Forma release</h2><p>Every site consumes the same versioned presentation layer.</p></div>
        <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#shell-main">Install</a></div>
      </div>
    </section>
  </main>
  <footer class="forma-site-footer" data-forma-tone="inverse">
    <div class="forma-site-footer__inner">
      <div class="forma-site-footer__main"><div><p class="forma-eyebrow">Example / Product</p><p>One sentence that says what the product is for.</p></div></div>
      <p class="forma-site-footer__note"><span>&copy; 2026 Example</span><span>Built with Forma</span></p>
    </div>
  </footer>
</div>
</forma-marketing-shell>

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

Examples

Scenario

Product page frame

A product page declared with data-forma-layout="product": no header tagline, release badges in the hero, and a footer with secondary navigation. The skip link targets the main region, which takes tabindex="-1" so focus lands on it. On a real page the main region is a main element and the hero title is the page's only h1; the catalog page already has both, so this specimen uses a div and an h2.

Live demo. 10 native actions work here and are verified by an outcome test.

Skip to main content

Product / Domain state

Make every legal transition explicit

Ordo models what work may happen next, so interfaces never guess.

  • Stable
  • Version 2.1.0

Model one workflow this week

Start from an existing process and make its rules executable.

HTML · Product page frame Raw HTML for HTML · Product page frame
<forma-marketing-shell class="forma-component-tag">
  <div class="forma-site" data-forma-layout="product">
    <a class="forma-skip-link" href="#marketing-shell-product-page-main">Skip to main content</a>
    <header class="forma-site-header">
      <div class="forma-site-header__inner">
        <div class="forma-site-header__identity">
          <a class="forma-site-header__brand" href="#marketing-shell-product-page-main"><span class="forma-site-header__mark" aria-hidden="true">OR</span><span class="forma-site-header__name">Harbor / Ordo</span></a>
        </div>
        <nav class="forma-site-nav" aria-label="Ordo">
          <ul class="forma-site-nav__list">
            <li><a class="forma-site-nav__link" href="#marketing-shell-product-page-main" aria-current="page">Overview</a></li>
            <li><a class="forma-site-nav__link" href="#marketing-shell-product-page-cta">Documentation</a></li>
            <li><a class="forma-site-nav__link" data-forma-variant="action" href="#marketing-shell-product-page-cta">Install</a></li>
          </ul>
        </nav>
      </div>
    </header>
    <div class="forma-site__main" id="marketing-shell-product-page-main" tabindex="-1">
      <section class="forma-hero" aria-labelledby="marketing-shell-product-page-title">
        <div class="forma-hero__content">
          <p class="forma-eyebrow">Product / Domain state</p>
          <h2 class="forma-hero__title" id="marketing-shell-product-page-title">Make every legal transition explicit</h2>
          <p class="forma-lead">Ordo models what work may happen next, so interfaces never guess.</p>
          <ul class="forma-badge-list" aria-label="Release facts">
            <li><span class="forma-badge" data-forma-status="success">Stable</span></li>
            <li><span class="forma-badge">Version 2.1.0</span></li>
          </ul>
          <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#marketing-shell-product-page-cta">Install</a></div>
        </div>
      </section>
      <section class="forma-section" id="marketing-shell-product-page-cta" aria-labelledby="marketing-shell-product-page-cta-title">
        <div class="forma-cta">
          <div class="forma-cta__text"><h2 id="marketing-shell-product-page-cta-title">Model one workflow this week</h2><p>Start from an existing process and make its rules executable.</p></div>
          <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#marketing-shell-product-page-main">Read the quick start</a></div>
        </div>
      </section>
    </div>
    <footer class="forma-site-footer" data-forma-tone="inverse">
      <div class="forma-site-footer__inner">
        <nav class="forma-site-footer__nav" aria-label="Ordo footer"><ul><li><a href="#marketing-shell-product-page-main">Privacy</a></li><li><a href="#marketing-shell-product-page-main">Source</a></li><li><a href="#marketing-shell-product-page-main">Release notes</a></li></ul></nav>
        <p class="forma-site-footer__note"><span>&copy; 2026 Example Harbor</span><span>Built with Forma</span></p>
      </div>
    </footer>
  </div>
</forma-marketing-shell>

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

Scenario

Single-offer page

A single-offer page is the marketing layout with fewer sections, not a separate layout. The header keeps its tagline where there is room, the page has one hero and one closing action, and the footer uses the surface tone instead of inverse.

Live demo. 4 native actions work here and are verified by an outcome test.

Example Harbor

Diagnostic engineering for consequential systems

Two-week diagnostic

Find the cause before you fund the fix

HTML · Single-offer page Raw HTML for HTML · Single-offer page
<forma-marketing-shell class="forma-component-tag">
  <div class="forma-site" data-forma-layout="marketing">
    <header class="forma-site-header">
      <div class="forma-site-header__inner">
        <div class="forma-site-header__identity">
          <a class="forma-site-header__brand" href="#marketing-shell-single-offer-main"><span class="forma-site-header__mark" aria-hidden="true">EH</span><span class="forma-site-header__name">Example Harbor</span></a>
          <p class="forma-site-header__tagline">Diagnostic engineering for consequential systems</p>
        </div>
        <nav class="forma-site-nav" aria-label="Offer">
          <ul class="forma-site-nav__list">
            <li><a class="forma-site-nav__link" href="#marketing-shell-single-offer-main" aria-current="page">Diagnostic</a></li>
            <li><a class="forma-site-nav__link" data-forma-variant="action" href="#marketing-shell-single-offer-main">Book a session</a></li>
          </ul>
        </nav>
      </div>
    </header>
    <div class="forma-site__main" id="marketing-shell-single-offer-main" tabindex="-1">
      <section class="forma-hero" aria-labelledby="marketing-shell-single-offer-title">
        <div class="forma-hero__content">
          <p class="forma-eyebrow">Two-week diagnostic</p>
          <h2 class="forma-hero__title" id="marketing-shell-single-offer-title">Find the cause before you fund the fix</h2>
          <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#marketing-shell-single-offer-main">Book a working session</a></div>
        </div>
      </section>
    </div>
    <footer class="forma-site-footer" data-forma-tone="surface">
      <div class="forma-site-footer__inner">
        <p class="forma-site-footer__note"><span>&copy; 2026 Example Harbor</span><span>Indianapolis, Indiana</span></p>
      </div>
    </footer>
  </div>
</forma-marketing-shell>

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

Phone-width frame

The whole frame at phone width: the tagline yields, navigation wraps under the brand instead of collapsing into a menu, and the header is not sticky.

Live demo. 8 native actions work here and are verified by an outcome test.

Viewport width

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

What changes at narrow widths

  • The header is sticky only at 40rem wide and 36rem tall or more; on phones it scrolls away so it never covers focused content or reading space.
  • The header tagline hides below a 56rem header width; the brand name stays visible and wraps instead of truncating.
  • Navigation links wrap onto a second line rather than hiding behind a menu, and every link, the brand and every button keep a 44px minimum height.
  • Gutters come from the fluid --forma-layout-gutter token, so nothing scrolls horizontally at 320px or at 200% text size.
  • Rotating the device only reflows the wrapping rows; source order, focus order and landmarks do not change.
HTML · Phone-width frame Raw HTML for HTML · Phone-width frame
<forma-marketing-shell class="forma-component-tag">
  <div class="forma-site" data-forma-layout="marketing">
    <a class="forma-skip-link" href="#marketing-shell-mobile-frame-main">Skip to main content</a>
    <header class="forma-site-header">
      <div class="forma-site-header__inner">
        <div class="forma-site-header__identity">
          <a class="forma-site-header__brand" href="#marketing-shell-mobile-frame-main"><span class="forma-site-header__mark" aria-hidden="true">EH</span><span class="forma-site-header__name">Example Harbor</span></a>
          <p class="forma-site-header__tagline">Evidence-driven engineering systems</p>
        </div>
        <nav class="forma-site-nav" aria-label="Site">
          <ul class="forma-site-nav__list">
            <li><a class="forma-site-nav__link" href="#marketing-shell-mobile-frame-main" aria-current="page">Overview</a></li>
            <li><a class="forma-site-nav__link" href="#marketing-shell-mobile-frame-main">Research</a></li>
            <li><a class="forma-site-nav__link" href="#marketing-shell-mobile-frame-main">Products</a></li>
            <li><a class="forma-site-nav__link" data-forma-variant="action" href="#marketing-shell-mobile-frame-main">Get in touch</a></li>
          </ul>
        </nav>
      </div>
    </header>
    <div class="forma-site__main" id="marketing-shell-mobile-frame-main" tabindex="-1">
      <section class="forma-hero" aria-labelledby="marketing-shell-mobile-frame-title">
        <div class="forma-hero__content">
          <p class="forma-eyebrow">Applied research</p>
          <h2 class="forma-hero__title" id="marketing-shell-mobile-frame-title">Prove what is wrong before changing it</h2>
          <div class="forma-actions"><a class="forma-button" data-forma-variant="primary" href="#marketing-shell-mobile-frame-main">Book a session</a><a class="forma-button" href="#marketing-shell-mobile-frame-main">See the work</a></div>
        </div>
      </section>
    </div>
    <footer class="forma-site-footer" data-forma-tone="inverse">
      <div class="forma-site-footer__inner">
        <p class="forma-site-footer__note"><span>&copy; 2026 Example Harbor</span><span>Built with Forma</span></p>
      </div>
    </footer>
  </div>
</forma-marketing-shell>

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.

Live demo. 8 native actions work here and are verified by an outcome test.

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
tabindexmain.forma-site__main-1—Required on the main region so activating the skip link moves focus into it; -1 keeps it out of the Tab order.
idmain.forma-site__mainstring—Skip-link target. The reference sites use main-content.
hrefa.forma-skip-link#id of the main region—Must point at the main region's id.
aria-labelnav.forma-site-navstring—Names the primary navigation landmark ("Primary" on a real page).
aria-currenta.forma-site-nav__linkpage | trueabsentMarks exactly one navigation link as the current location.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-siteBlock class—Shell root, normally on body. Scopes every marketing foundation, sets the base tone, and stacks header, main and footer in a column.
.forma-site__mainElement class—Main content region. Centers content to --forma-layout-width-max, applies gutters, grows to push the footer down, and is the forma-main size container the documentation layout queries.
--forma-site-backdropCustom property—Optional decorative background image drawn behind the whole shell on a fixed pseudo-element. Default none; an organization theme may set a faint drafting grid. Allowlisted for site identity.
--forma-site-backdrop-opacityCustom property—Opacity of the backdrop layer. Default 1.
--forma-site-backdrop-sizeCustom property—Background size for the backdrop. Default auto.
[data-forma-layout]Attribute hook—Declares the page type: marketing, product or documentation. No layout rules key off it; sites may use it as a selector for allowlisted identity retargets.
[data-forma-tone]Attribute hook—Surface tone on any region inside the shell: page (default), surface, elevated or inverse. A tone sets the background and the --forma-tone-* text, link, label and rule colors that every component reads.
Keyboard interaction
KeysResult
Tab (first press)Focuses the skip link, which becomes visible at the top of the viewport.
Enter on the skip linkNative link activation: scrolls to the main region and moves focus into it; the next Tab continues inside main.
Tab / Shift+TabMoves through header, main and footer links in source order.

States

Marketing shell states
StateHow it is expressedPresentation
Skip link focused:focus on .forma-skip-linkThe skip link slides into view at the top-left corner; otherwise it sits above the viewport.
Main focused:focus on .forma-site__main (tabindex=-1)No outline is drawn on the region itself; the next Tab reaches its first interactive element.
Current pagearia-current on one navigation linkA persistent under-rule marks the current destination, not color alone.
Sticky header@media (min-width: 40rem) and (min-height: 36rem)The header sticks to the top and anchor targets get scroll padding so they land below it.
Print@media printSkip link, navigation, footer actions and backdrop are removed; tones flatten to CanvasText on no background.

Accessibility

Forma provides

  • Keeps skip link, banner, main and contentinfo in source order with no CSS reordering.
  • Gives every interactive element in the shell the same visible focus ring and halo on every surface tone, and never lets the sticky header obscure focus on short or narrow viewports.
  • Surface tones use only contrast-validated token pairs, so text and links stay AA on surface, elevated and inverse regions.
  • Keeps navigation, brand and button targets at least 44px tall and keeps the brand name visible at every width.
  • Removes transitions and smooth scrolling under reduced motion and draws borders on tones, buttons and badges in forced colors.

Your application supplies

  • Put the skip link first in body and point it at main with tabindex="-1".
  • Use exactly one h1 (the hero title), no skipped heading levels, and one aria-current navigation link.
  • Name the primary navigation with aria-label and any second navigation (footer) with a different label.
  • Set lang and a page title; load the fonts the theme names, since webfonts are not packaged (GAP-MKT-02).
  • Keep at most one data-forma-variant="primary" action per hero, section or CTA.

Responsive behavior

  • All recomposition is content-driven: header, hero, section heading, CTA and footer are wrapping flex rows; cards and facts are auto-fit grids with minimum sizes.
  • The header becomes sticky only at min-width: 40rem and min-height: 36rem, which also excludes high zoom and short landscape phones.
  • .forma-site__main is capped at --forma-layout-width-max and uses the fluid --forma-layout-gutter; there is no horizontal scrolling at 320px or with 200% text.
  • .forma-site__main is an forma-main size container; the documentation layout regroups against it at 48rem and 72rem.

Motion

  • Anchor jumps, including the skip link, scroll smoothly only under prefers-reduced-motion: no-preference.
  • Buttons and linked cards interpolate color over the shared perceptual duration (about 120ms); nothing inside the shell moves spatially on hover.
  • Under prefers-reduced-motion: reduce every transition, animation and smooth scroll inside .forma-site is removed.
  • The skip link appears instantly on focus (a transform with no transition). The backdrop is static.

Usage guidance

Do

  • Start every page from the shell pattern and compose only Forma components inside main.
  • Use data-forma-tone to change a region's background so components adapt automatically.
  • Pin the Forma release in forma.lock and keep local CSS to identity imagery and allowlisted retargets.

Avoid

  • Restyling forma-* classes or global elements in site CSS; the site CSS policy check rejects it.
  • Hiding navigation links in a script-driven menu at narrow widths; the shell wraps them by design.
  • Nesting a second .forma-site or wrapping application UI in the shell.

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.