Container
The page's width, centred, with the gutter on both sides: narrow for reading, page for everything, wide for dashboards.
import { Container } from '@sypnia/ui/react'
On this page
Three widths
narrow: the measure of reading
page: the width of every page
wide: dashboards and tables
Code
import { Container } from '@sypnia/ui/react';
const box = { padding: 'var(--s-3)', border: '1px dashed var(--line-strong)', borderRadius: 'var(--r-2)', textAlign: 'center' } as const;
export default function Widths() {
return (
<div className="sy-stack" style={{ '--gap': 'var(--s-3)' } as React.CSSProperties}>
<Container size="narrow"><div style={box}>narrow: the measure of reading</div></Container>
<Container><div style={box}>page: the width of every page</div></Container>
<Container size="wide"><div style={box}>wide: dashboards and tables</div></Container>
</div>
);
} When to use it
Use it when
- The outer box of a landing section, a sign-in page, a docs page.
Do not use it when
- Inside the AppShell: Page already sets the width.
For everyone
- It only lays out; nothing is announced.
Props
| Container | Type | Default |
|---|---|---|
as | ElementType | div |
className | string | |
id | string | |
size | "page" | "wide" | "narrow" | page |