Main
A focusable <main> landmark for the page's primary content. Pair it with the SkipToMainLink component at the top of the document.
A page has one main landmark, and this docs page already renders it around the content you are reading. A live example here would render a second one, so the page shows the markup instead:
When to use
- Mark the primary content of a page as a focusable
<main>landmark that a skip link can move focus to. - Prefer
AppLayoutfor a page in the app shell:AppLayout.Bodyalready renders the landmark.
Focus target
Main renders with id="main" and tabIndex={-1}. A skip link, or any programmatic focus call, can then send keyboard users directly to the main content, and the region itself shows no visible focus ring.
API Reference
Main
Renders a <main> element with id="main", tabIndex={-1}, and focus:outline-hidden. Accepts all standard <main> HTML attributes except id and tabIndex: SkipToMainLink targets #main and focuses it, so Main stamps both. Additional class names passed via className are merged with the defaults.