Page Layout
A page's column: centered at a dense (73.75rem), wide (90rem) or full width, with page gutters and gap-section between blocks, a header slot, and a workspace variant without padding for app-like screens.
Example
Projects
Every project, with its latest deployment.
Deployments
Last 7 days.
42
page-layout-demo.tsxCopy code
Installation
Copy code
npm packages
class-variance-authority@0.7.1Usage
ImportCopy code
API reference
PageLayout
| Prop | Type | Default |
|---|---|---|
width`dense` caps the content at 73.75rem, `wide` at 90rem, `full` has no cap. Ignored by the workspace variant. | "dense" | "wide" | "full" | "dense" |
variant`workspace` drops the padding and the cap for app-like screens that lay out their own panes. | "default" | "workspace" | "default" |
headerUsually a PageHeader. It comes first, in the same column as the content. | ReactNode | – |
as`main` renders the `<main>` landmark, with `id="main"` unless you pass one, so a SkipLink's default `#main` reaches it. Leave it as `div` when the app shell already renders `<main>`: a page has only one. | "div" | "main" | "div" |
Also takes <div> attributes except title.
Other exports
type PageLayoutPropstype PageWidthAccessibility
- as="main" renders the main landmark with id="main", so a SkipLink reaches it.
- Never a live region.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.