| Columns · gutter · side margin |
|---|
| Desktop | 12 columns · 24px · 112px on a 1440px frame (1216px content width) |
| Tablet | 6 columns · 32px · 32px |
| Mobile | 4 columns · 16px · 16px |
On desktop, center the content at a maximum width of 1216px. On screens between 1280px and 1440px, the side margin shrinks to 32px.
Common spans for each tier. A span that is wider than the tier's grid takes the full width.
| Layout | Desktop · tablet · mobile |
|---|---|
| Full width | 12 · 6 · 4 columns |
| Half | 6 · 3 · 4 columns |
| Main content and side panel | 8 + 4 · 6 + 6 (stacked) · 4 + 4 (stacked) |
| Thirds (cards) | 4 · 3 (two per row) · 4 (one per row) |
| Quarters (metrics) | 3 · 3 (two per row) · 2 (two per row) |
Use CSS grid with Tailwind. Change the number of columns at md: (768px, tablet) and xl: (1280px, desktop), the two Tailwind prefixes that match the system breakpoints.
<main className="mx-auto w-full max-w-[1216px] px-4 md:px-8">
<div className="grid grid-cols-4 gap-4 md:grid-cols-6 md:gap-8 xl:grid-cols-12 xl:gap-6">
<section className="col-span-4 md:col-span-6 xl:col-span-8">Main content</section>
<aside className="col-span-4 md:col-span-6 xl:col-span-4">Side panel</aside>
</div>
</main><ul className="grid grid-cols-4 gap-4 md:grid-cols-6 md:gap-8 xl:grid-cols-12 xl:gap-6">
{items.map((item) => (
<li key={item.id} className="col-span-4 md:col-span-3 xl:col-span-4">
<Card … />
</li>
))}
</ul>| Tailwind prefix | Use |
|---|---|
| md (768px) | Tablet grid: 6 columns, 32px gutter and margin. |
| xl (1280px) | Desktop grid: 12 columns, 24px gutter. |
| sm, lg, 2xl (640, 1024, 1536px) | Only for fine-tuning inside a tier. Tokens don't change at these widths. |