# Marketing foundation

> The type scale, spacing, frames, and product scenes that marketing blocks share.

Source: https://www.honestui.com/docs/marketing/foundation

Every block installs the foundation with it. Use the same pieces for sections of your own, and they will sit next to the blocks without adjustment.

<CliBlock commands="[&#x22;marketing-foundation&#x22;]" />

The files go to `components/marketing/foundation`. Tokens and classes are prefixed with `mkt`, so product screens keep the proportions of your theme.

## Pieces [#pieces]

| Piece                           | Responsibility                                                                       |
| ------------------------------- | ------------------------------------------------------------------------------------ |
| `MarketingSection`              | The space above and below a section, and its surface: `plain`, `wash`, or `inverse`  |
| `MarketingContainer`            | The shared edge and gutter: `content` is 1200 pixels, `wide` is 1440, `prose` is 736 |
| `MarketingHeading`              | A heading whose level and size are chosen separately                                 |
| `SectionHeading`                | Eyebrow, title, description, and action, aligned `start`, `center`, or `split`       |
| `ActionGroup`, `TextLink`       | One primary action with others that wrap, and a quiet text action                    |
| `ProductFrame`, `ProductStage`  | The elevated treatment for an interface preview, and the ground it stands on         |
| `StageBackdrop`                 | Ribbed glass for a stage, in tints of the accent color                               |
| `MediaFrame`                    | Image proportions, a separate mobile crop, a dark version, and a caption             |
| `Portrait`, `PersonAttribution` | Name, role, and organization in one fixed order                                      |
| `LogoItem`, `LogoGroup`         | Optical sizing, and a row that becomes a grid                                        |

## Compose a section [#compose-a-section]

```tsx
import { ActionGroup } from "@/components/marketing/foundation/action-group"
import { MarketingContainer, MarketingSection } from "@/components/marketing/foundation/section"
import { SectionHeading } from "@/components/marketing/foundation/section-heading"

<MarketingSection aria-labelledby="security-title">
  <MarketingContainer>
    <SectionHeading
      align="split"
      titleId="security-title"
      title="Kept where you ask us to."
      description="Documents stay in the region you choose, backups included."
      action={<ActionGroup actions={[{ label: "Read the policy", href: "/security" }]} />}
    />
  </MarketingContainer>
</MarketingSection>
```

## Type and spacing [#type-and-spacing]

Sizes are fluid between a 375 pixel and a 1440 pixel viewport. Change the tokens in `marketing.css` to change every block at once.

| Token                | Phone | Desktop | Used for                           |
| -------------------- | ----- | ------- | ---------------------------------- |
| `--mkt-size-hero`    | 42px  | 80px    | Editorial heroes and closing lines |
| `--mkt-size-product` | 40px  | 68px    | Product heroes                     |
| `--mkt-size-section` | 31px  | 48px    | Section headings                   |
| `--mkt-size-quote`   | 24px  | 38px    | Large quotes                       |
| `--mkt-size-title`   | 20px  | 22px    | Feature titles                     |
| `--mkt-size-lead`    | 17px  | 19px    | Supporting paragraphs              |
| `--mkt-section`      | 72px  | 128px   | The whole gap between two sections |
| `--mkt-gutter`       | 20px  | 40px    | The page edge                      |

One owner sets each gap. Sections set the space between sections, the container sets the edge, and blocks set only what is inside them.

## Product scenes [#product-scenes]

Scenes are pictures of an interface built from real markup. They follow your theme, stay sharp at every size, and reflow in a small container. They share one story, one cast, and one set of rules for text, icons, padding, and status.

<CliBlock commands="[&#x22;marketing-scenes&#x22;]" />

| Scene                   | Shows                                                         |
| ----------------------- | ------------------------------------------------------------- |
| `DocumentReviewScene`   | A document with tracked changes, comments, and approvals      |
| `ApprovalPanelScene`    | Who was asked, who has answered, and when it is due           |
| `VersionCompareScene`   | What changed, who changed it, and every version before        |
| `SearchResultsScene`    | A phrase found across several documents                       |
| `ReviewScheduleScene`   | Who reads when, and what the publish date waits for           |
| `SignoffAnalyticsScene` | One measure over time, from zero, with its ends labeled       |
| `WorkflowStepsScene`    | The path a document takes, in order                           |
| `FileLibraryScene`      | Every document with its state, and the selected one in detail |
| `ApiResponseScene`      | A request and what comes back                                 |

Place a scene in a `ProductFrame` and describe it. The frame is announced as one image and nothing inside it can be focused.

```tsx
import { ProductFrame, ProductStage } from "@/components/marketing/foundation/product-frame"
import { ApprovalPanelScene } from "@/components/marketing/scenes/approval-panel"

<ProductStage className="p-12">
  <ProductFrame label="An approval panel. Two of three people have approved.">
    <ApprovalPanelScene />
  </ProductFrame>
</ProductStage>
```

## Stage backdrop [#stage-backdrop]

`StageBackdrop` draws [Fluted Glass](/docs/shaders/fluted-glass) behind a product frame. Its three colors are `--mkt-glass-1`, `--mkt-glass-2`, and `--mkt-glass-3`, which follow the accent color and the theme. It stops when it leaves the screen, holds one still frame with reduced motion, and is a flat tint without WebGL.

Every block with a stage takes a `backdrop`: an image, an element of your own, or `null` for no backdrop.

```tsx
import { HeroCenteredProduct } from "@/components/marketing/hero-centered-product"
import { Silk } from "honestui/shaders"

<HeroCenteredProduct backdrop={<Silk className="absolute inset-0 -z-1" color="#1d2536" />} />
```

## Motion [#motion]

Small feedback takes 150 to 220 milliseconds and panels take 250 to 400. Entrances move ten pixels at most. When someone prefers reduced motion, everything appears in its finished state.

## Accessibility [#accessibility]

* Text meets 4.5:1 in both themes. `--mkt-ink-faint` does not, so use it only for marks and rules.
* Headings keep their level when you change their size. Give the first block on a page `as="h1"` if you compose your own.
* Sections reflow at 320 pixels without horizontal scrolling.
* Links and controls reach 44 pixels on touch screens.
