Skip to content

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
  1. Three widths
  2. When to use it
  3. For everyone
  4. Props

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

ContainerTypeDefault
as ElementType div
className string
id string
size "page" | "wide" | "narrow" page
  1. Three widths
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms