Grid System
A grid system provides shared columns, gutters, margins, and spacing rules that align interface content while adapting to available space.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/grid-system/
01What it means
A grid system is a structural framework for placing and sizing interface regions. It combines containers, columns, gutters, margins, baselines, and spacing tokens. The grid creates repeatable alignment and responsive relationships; it is a decision aid, not a mandate that every component occupy equal columns.[1][2][3]
02Why it matters
Consistent spatial rules make pages easier to scan and reduce one-off layout decisions. A flexible grid supports hierarchy, reuse, and responsive adaptation while reserving predictable space. It also reduces implementation drift when design tokens and code share constraints.
03When to use it
Use a grid for multi-region pages, dashboards, forms, editorial layouts, and templates. Choose complexity based on content: a reading page may need only maximum width and spacing, while a dense application benefits from named regions and nested grids.
04How it works
- Inventory content relationships and define containers, margins, gutters, and spacing.
- Select columns or named regions that support actual compositions at relevant widths.
- Let components span by content needs, with intrinsic minimums and maximums.
- Change or collapse the grid at content-driven breakpoints while preserving order.
- Encode shared tokens or utilities and test overflow, zoom, localization, and nesting.
05A practical example
A government service uses a 12-column desktop grid but places most forms in a readable six-column measure. At narrow widths, fields stack in DOM order and gutters shrink without touching the viewport edge. Data tables use a wider template rather than forcing every page into form width.
06Where it breaks
Grids can create false precision and repetitive layouts. A 12-column framework is not inherently usable, and excessive nesting complicates code. Rigid widths fail under zoom, translations, or large text. Alignment should serve reading and task flow, not arbitrary geometry.
Common mistakes
- Treating the grid as decoration rather than a content rule
- Forcing every component to the same span
- Reordering areas visually without preserving semantic and focus order