Page Layout
Basic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { PageLayout } from "@corew500/ui/page-layout"
<PageLayout>Content</PageLayout>Variants
pageLayoutVariants
| Axis | Values | Default |
|---|---|---|
| paddingY | nonesmmdlgxl | lg |
| paddingX | nonesmmdlg | lg |
| centered | truefalse | false |
Variants
Loading...
Centered Layout
Loading...
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| maxWidth | enum | 4xl | Maximum 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 |
| paddingY | enum | "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) |
| paddingX | enum | "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) |
| centered | enum | false | Whether 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