Brik Design System
Components

Page

The page shell container — a shared horizontal inset and a known header-to-body rhythm. The connective tissue PageHeader and PageContent compose inside.

Page is the shell container every product page shares: a PageHeader handing off to a PageContent body across a known vertical gap, inside one shared horizontal column. It owns the page's inset and header-to-body rhythm so individual pages stop re-deriving them. Composition uses sibling named exportsPage, PageHeader, PageContent — not a compound Page.Header namespace (a compound static does not survive Next/Turbopack RSC bundling).

Use it for

  • The outer shell of any product page — header + body in a shared column
  • Standardizing horizontal inset and header→body spacing across a product
  • Full-bleed board / table pages that need the body to break out and own its scroll

Import

import { Page, PageHeader, PageContent } from '@brikdesigns/bds';

Variants

Default

padding sets the shared horizontal inset (single source of truth for the column); gap sets the vertical space between header and body.

// The parent must be a flex column — the app shell provides this.
<Page padding="md" gap="xl">
  <PageHeader title="Services" subtitle="…" actions={<Button>Add</Button>} />
  <PageContent>
    <FilterBar total={49} filtered={49} label="services" />
    <Table>…</Table>
  </PageContent>
</Page>

Page always sets flex: 1; min-height: 0 on itself so fill-height bodies work — but that only takes effect inside a flex-column parent (the app shell). In a non-flex parent it sizes to content: degraded, not broken.

Full-bleed body with internal scroll

PageContent inherits the page inset by default. Set padding="none" to break out edge-to-edge for a board or table, and scroll so the body scrolls internally while the page frame stays put.

<Page padding="md">
  <PageHeader title="Board" />
  <PageContent padding="none" scroll>
    <Board>…</Board>
  </PageContent>
</Page>

When not to use

Don't use Page for generic content grouping. It is the page-level shell (header + body column). For arranging content within the body, use the layout primitives Stack, Grid, Cluster, or Frame.

  • Don't nest Page inside Page. One shell per page — additional structure comes from the layout primitives inside PageContent.

Accessibility

  • Page is a structural <div> shell — semantics come from what you place inside it (PageHeader's heading, the body's landmarks).
  • Keep the app shell a flex column so the fill-height + internal-scroll contract holds; otherwise the body won't own its scroll region.

API

Page

PropTypeDefault
padding'none' | 'sm' | 'md' | 'lg''md'
gap'none' | 'sm' | 'md' | 'lg' | 'xl' | 'huge''xl'
childrenReactNode (required)

Plus all standard <div> HTML attributes.

PageContent

PropTypeDefault
padding'inherit' | 'none' | 'sm' | 'md' | 'lg''inherit'
gap'none' | 'sm' | 'md' | 'lg' | 'xl' | 'huge''lg'
scrollbooleanfalse
childrenReactNode

Plus all standard <div> HTML attributes.

On this page

💬