Skip to content
Components

Page layout

BetaBeta — the props contract is close to final, but small breaking changes can still land.

Page shell that owns the scroll container, the shared measure, and the title and actions row.

Composition

Page shell

PageLayout owns the scroll container and the shared measure; the header and body align to the same edges.

  • <PageLayout>
    • <PageHeader>
      • <PageTitle />
      • <PageDescription />
      • <PageActions />
      </PageHeader>
    • <PageBody>
      • page content
      </PageBody>
    </PageLayout>

Reading page with a rail

Pass aside to add a secondary column; it widens the measure and hides when the layout is too narrow for both columns.

  • <PageLayout>
    • <PageBody>
      • article
      • aside prop
        • <TableOfContents />
      </PageBody>
    </PageLayout>

Installation

The Control UI source installs this primitive from src/registry/sources/control-ui/ui/page-layout.tsx.

Registry command
See registry manifest

Dependencies

Raw code

Primary installed source

src/registry/sources/control-ui/ui/page-layout.tsx

Knobs

Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.

--cui-page-layout-* · 14 knobsHow the cascade resolves
--cui-page-layout-article-size<length-percentage>40rem
--cui-page-layout-aside-size<length-percentage>11.25rem
--cui-page-layout-padding-inline<length-percentage>calc(var(--spacing) * 5)
--cui-page-layout-padding-block<length-percentage>+calc(var(--spacing) * 10) calc(var(--spacing) * 24)
--cui-page-layout-column-gap<length-percentage>calc(var(--spacing) * 5)
--cui-page-layout-header-start-gap<length-percentage>calc(var(--spacing) * 10)
--cui-page-layout-header-gap<length-percentage>calc(var(--spacing) * 8)
--cui-page-layout-header-column-gap<length-percentage>calc(var(--spacing) * 4)
--cui-page-layout-header-row-gap<length-percentage>calc(var(--spacing) * 2)
--cui-page-layout-size<length-percentage> | nonecalc(var(--cui-page-layout-article-size) + var(--cui-page-layout-padding-inline) * 2)
--cui-page-layout-sticky-gap<length-percentage>0px
--cui-page-layout-background<color>var(--canvas)
--cui-page-layout-sticky-header-background<color>oklch(from var(--cui-page-layout-background) l c h / 0.85)
--cui-page-layout-sticky-header-backdrop-filter*blur(12px)