Marketing foundation
The type scale, spacing, frames, and product scenes that marketing blocks share.
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.
The files go to components/marketing/foundation. Tokens and classes are prefixed with mkt, so product screens keep the proportions of your theme.
Pieces
Compose a section
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
Sizes are fluid between a 375 pixel and a 1440 pixel viewport. Change the tokens in marketing.css to change every block at once.
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
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.
Place a scene in a ProductFrame and describe it. The frame is announced as one image and nothing inside it can be focused.
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
StageBackdrop draws 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.
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
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
- Text meets 4.5:1 in both themes.
--mkt-ink-faintdoes 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.