GitHub

Page Layout

Page content layout with header and sections

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { PageLayout } from "@corew500/ui/page-layout"

<PageLayout>Content</PageLayout>

Variants

pageLayoutVariants

AxisValuesDefault
paddingY
nonesmmdlgxl
lg
paddingX
nonesmmdlg
lg
centered
truefalse
false

Variants

Loading...

Centered Layout

Loading...

API Reference

Props

PropTypeDefaultDescription
maxWidthenum4xlMaximum width constraint for the content. - `md`: 28rem (448px) - narrow content - `lg`: 32rem (512px) - forms, dialogs - `xl`: 36rem (576px) - articles - `2xl`: 42rem (672px) - wide articles - `3xl`: 48rem (768px) - content pages - `4xl`: 56rem (896px) - dashboards - `full`: No max-width constraint
paddingYenum"lg"Vertical padding that scales with viewport. - `none`: No vertical padding - `sm`: Minimal padding (py-4 → py-6) - `md`: Moderate padding (py-6 → py-10) - `lg`: Comfortable padding (py-8 → py-16) - `xl`: Spacious padding (py-12 → py-20)
paddingXenum"lg"Horizontal padding that scales with viewport. - `none`: No horizontal padding (for full-bleed content) - `sm`: Fixed small padding (px-4) - `md`: Responsive padding (px-4 → px-6) - `lg`: Responsive padding (px-4 → px-8)
centeredenumfalseWhether to center content both vertically and horizontally. Useful for login pages, error pages, and centered forms.

Accessibility

Additional

  • - PageLayout is a purely visual layout component with no semantic meaning
  • Wrap content in appropriate semantic elements (main, section, article)
  • For the primary page content, use `<main>` inside PageLayout

Localization

Translatable Content

  • - PageLayout has no text content and requires no localization

RTL Support

  • Layout adapts correctly for both LTR and RTL languages

Related