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.
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.
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.
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.
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.
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.
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.
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
tabindex
main.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.
id
main.forma-site__main
string
—
Skip-link target. The reference sites use main-content.
href
a.forma-skip-link
#id of the main region
—
Must point at the main region's id.
aria-label
nav.forma-site-nav
string
—
Names the primary navigation landmark ("Primary" on a real page).
aria-current
a.forma-site-nav__link
page | true
absent
Marks exactly one navigation link as the current location.
CSS hooks (derived from dist/all.css)
Hook
Kind
Values or default
Description
.forma-site
Block 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__main
Element 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-backdrop
Custom 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-opacity
Custom property
—
Opacity of the backdrop layer. Default 1.
--forma-site-backdrop-size
Custom 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
Keys
Result
Tab (first press)
Focuses the skip link, which becomes visible at the top of the viewport.
Enter on the skip link
Native link activation: scrolls to the main region and moves focus into it; the next Tab continues inside main.
Tab / Shift+Tab
Moves through header, main and footer links in source order.
States
Marketing shell states
State
How it is expressed
Presentation
Skip link focused
:focus on .forma-skip-link
The 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 page
aria-current on one navigation link
A 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 print
Skip 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.