Container
The centred page column, as wide as the theme's width, with room at the sides
Preview
How booking works
Pick a room and a time, pay online, and the door code arrives by email the evening before. Plans change: move or cancel up to a day ahead at no cost.
Use
The code of the preview above
import { Container, Stack } from '@/components/ui';
<Container narrow>
<Stack gap={2}>
<h3 className="ui-title">How booking works</h3>
<p>Pick a room and a time, pay online, and the door code arrives by email the evening before. Plans change: move or cancel up to a day ahead at no cost.</p>
</Stack>
</Container>Options
| Option | Type | What it does |
|---|---|---|
narrow | boolean | A reading column (640px) instead of the theme's page width. |
It also takes the 280 attributes of the element or UI SDK part it draws: className, aria-label, events and the rest.
Without React
The same look on any HTML, with the classes ui-container.
Layout: states, do and don’t
Centred column for pages without a sidebar, as wide as the theme's width; narrow is a reading column.
States. Layout follows the box it is in, not the window: Split, Grid, AppShell and the site parts stack when their box is narrow, at any width of the window.
Do
- Space with
gap(Stack,Row,Grid), never with margins on children. - Put the page's sections straight on the page, under their titles; a
Cardis one thing a person picks or acts on. - Check every screen at 320, 375 and 768 px with the narrow check of rule 10.
Don't
- Don't give a box a fixed width, or a
min-heighttogether with anaspect-ratio. - Don't nest a card in a card.
- Don't put two
<main>s on a page: a screen shown inside another page takesMain as="div".