Skip to content
Site volume
Colourway

Components

Main

The main landmark with the skip link's target id.

  • Beta
  • Reading layer
  • Server component
  • Since 0.1.0
  • Press check
Import from@maxgrits/overprint-react/main
On this page

Example#

A page has exactly one main landmark, so this one shows as code rather than live inside the docs page's own.

import { Main } from "@maxgrits/overprint-react/main";

<SkipLink />
<Navbar items={items} />
<Main>
  <PageHero title="Websites that win customers." />
</Main>

Usage#

Every page has one Main around its primary content, after the navbar and before the footer. It is the target of the SkipLink, so keyboard users can jump past the header.

  • One per page. A page with two main landmarks confuses screen readers; the docs show it as code for that reason.
  • Focus. tabIndex={-1} lets the skip link move focus here without making it a tab stop; it shows no ring.
  • Scrolling. Its scroll margin clears the sticky header, so a skipped-to page never starts under the bar.

Anatomy#

  1. Main landmark: main#mk-main.mk-main, the skip link's target.
  2. Content: the page's hero and sections, in reading order.

Volume#

Main prints nothing of its own, so it is the same at every volume.

Content#

  • Everything that is the page's own content goes in it; repeated chrome (navbar, footer, the action dock) stays outside.

Do and don't#

Do

<SkipLink />
<Navbar />
<Main>…</Main>
<Footer />

Chrome outside, content inside.

Don't

<Main>
  <Navbar />
  …
  <Footer />
</Main>

The navbar and footer inside main.

Main is what the skip link jumps to. With the navbar inside it, skipping lands back on the navigation.

Accessibility#

  • tabIndex={-1} lets the skip link move focus here; it shows no ring because it is not interactive.
  • scroll-margin-top keeps it clear of the sticky header.

Props#

PropTypeDefaultDescription
childrenReactNodenone

Plus 279 React and DOM attributes passed through to the root element (className, ref, aria-*, event handlers and the rest). Generated from MainProps in packages/overprint-react/src/reading/main/main.tsx.

Tokens#

Its own properties (1)

  • --mk-header-h

Scanned from its CSS at build and checked against its registry entry.

Changelog#

Arrived in 0.1.0.

0.1.024 October 2026

  • MinorreactSection with its plate and Art slot, Plate, VolumeScope, PageHero, SectionHead, Eyebrow, Card, LineCard, InfoPanel, Stack, Cluster, Grid, Container, Main, Rule and the FittedLine client fitter; Navbar with the NavDisclosure mega panels, Footer, FooterMap, BuildStamp, SkipLink, ActionDock and VisitorControls; the Table parts, ComparisonTable with the one-tier switcher, SpecStrip, Numeral, Stat, StatGroup, StatusChip, Badge and ScoreDial; Prose with mdxComponents, Quote, CodeBlock with CopyButton, Figure, ScreenshotFrame and PhoneFrame; and the brand: the three evolved 2 × 2 options in markGeometry (a Overprint by default, b Paper seam, c Key block) with the pixel-snapped px mode and the one-ink seam variant, logoGeometry with the 1x clear-space frame, Mark, Wordmark, Logo, MaxosMark and LineBadge. Read the whole entry