> ## Documentation Index
> Fetch the complete documentation index at: https://www.beeq.design/llms.txt
> Use this file to discover all available pages before exploring further.

# Grid

> BEEQ grid guidance helps teams structure responsive layouts with consistent columns, gutters, margins, and spacing.

![BEEQ grid system overview - light mode](https://mintcdn.com/beeq/zRpidP9a1v6VjEnn/foundations/images/grid/grid-overview-light.svg?fit=max\&auto=format\&n=zRpidP9a1v6VjEnn\&q=85\&s=013fa996626803acc46008fb7ecf40ff)

BEEQ grid system overview

The grid helps you place content with consistent alignment, spacing, and hierarchy across screen sizes. It gives designers and developers a shared structure for page regions, cards, forms, and dense product layouts.

Use the grid to guide layout decisions, not to force every screen into the same shape. Content should determine where the layout changes, which container strategy fits, and how much space sits between regions.

> [!NOTE]
>
> BEEQ does not ship grid utilities, grid classes, or a grid component. The grid is documented as layout guidance. Use CSS Grid, your application's layout framework, or any tool that fits your stack, then apply BEEQ spacing tokens for gutters and margins.

***

## Grid anatomy

BEEQ grid layouts are built from columns, gutters, and margins. These three parts control where content sits, how regions separate, and how much breathing room the layout keeps at the viewport edge.

![Grid anatomy - light mode](https://mintcdn.com/beeq/zRpidP9a1v6VjEnn/foundations/images/grid/grid-anatomy-light.svg?fit=max\&auto=format\&n=zRpidP9a1v6VjEnn\&q=85\&s=5a5e7c7eff8f41adaa9d491399fc823b)

Grid anatomy: columns, gutters, and margins

### Columns

Columns define the vertical tracks that content can span. A 12-column structure is flexible because it divides cleanly into halves, thirds, fourths, and sixths.

### Gutters

Gutters are the space between columns. They separate layout regions and should use BEEQ spacing values so the page rhythm matches the components inside it.

### Margins

Margins are the space outside the grid columns. They keep content away from viewport edges and can be fixed, fluid, or responsive depending on the container strategy.

***

## Grid types

Different grid types solve different layout problems. Most product screens use a column grid, while editorial, data-heavy, or text-heavy screens may need supporting structure from baseline, manuscript, or modular grids.

![Baseline grid](https://www.beeq.design/foundations/images/grid/grid-type-baseline-light.svg)
![Baseline grid](https://www.beeq.design/foundations/images/grid/grid-type-baseline-dark.svg)

## Baseline grid

Baseline grids use horizontal rows to align text rhythm and vertical spacing. They help long, multi-column content feel ordered.

![Column grid](https://www.beeq.design/foundations/images/grid/grid-type-column-light.svg)
![Column grid](https://www.beeq.design/foundations/images/grid/grid-type-column-dark.svg)

## Column grid

Column grids split the page into vertical tracks. They are the default choice for responsive application layouts because regions can span different column counts at different widths.

![Manuscript grid](https://www.beeq.design/foundations/images/grid/grid-type-manuscript-light.svg)
![Manuscript grid](https://www.beeq.design/foundations/images/grid/grid-type-manuscript-dark.svg)

## Manuscript grid

Manuscript grids use one primary content column. Use them for long-form text, documentation, or reading surfaces where line length matters more than dashboard density.

![Modular grid](https://www.beeq.design/foundations/images/grid/grid-type-modular-light.svg)
![Modular grid](https://www.beeq.design/foundations/images/grid/grid-type-modular-dark.svg)

## Modular grid

Modular grids combine columns and rows into cells. They support dashboards, galleries, and structured content where items need consistent width and height relationships.

***

## 12-column layout

Use a 12-column grid when a screen needs flexible region widths. It lets you create common spans such as full width, half width, thirds, fourths, and sidebars without inventing a new structure for each screen.

```css CSS icon="css" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--bq-spacing-m);
  max-inline-size: 64rem;
  margin-inline: auto;
}

.grid-panel {
  display: grid;
  gap: var(--bq-spacing-xs);
  align-content: start;
  min-block-size: 5rem;
  padding: var(--bq-spacing-s);
  border: var(--bq-stroke-s) solid var(--bq-stroke--primary);
  border-radius: var(--bq-radius--s);
  background: var(--bq-background--secondary);
}

.grid-panel--wide {
  grid-column: span 8;
}

.grid-panel--side {
  grid-column: span 4;
}

.grid-panel--half {
  grid-column: span 6;
}

.grid-panel h3 {
  font-size: var(--bq-font-size--l);
  line-height: var(--bq-font-line-height--regular);
}

@media (max-width: 36rem) {
  .grid-panel,
  .grid-panel--wide,
  .grid-panel--side,
  .grid-panel--half {
    grid-column: 1 / -1;
  }
}
```

```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
<main class="dashboard-grid" aria-label="Responsive 12-column layout example">
  <section class="grid-panel grid-panel--wide">
    <h3>Overview</h3>
    <p>Spans 8 of 12 columns on wider screens.</p>
  </section>
  <aside class="grid-panel grid-panel--side">
    <h3>Summary</h3>
    <p>Spans 4 columns beside the overview.</p>
  </aside>
  <section class="grid-panel grid-panel--half">
    <h3>Activity</h3>
    <p>Spans half the grid.</p>
  </section>
  <section class="grid-panel grid-panel--half">
    <h3>Tasks</h3>
    <p>Spans half the grid.</p>
  </section>
</main>
```

***

## Breakpoints

BEEQ breakpoint ranges are design guidance for deciding when a layout should change. They are not generated classes, custom `screens` values, or a container API.

| Breakpoint | Viewport |
| - | - |
| Phones | `576-768px` |
| Tablets | `768-992px` |
| Desktop | `992-1200px` |
| Large devices | `1200-1920px` |

Use app-level media queries, container queries, or the layout tools already in your application to implement responsive behavior. Add a breakpoint when the content needs a different layout, not because a range exists in the table.

![BEEQ breakpoints - light mode](https://mintcdn.com/beeq/zRpidP9a1v6VjEnn/foundations/images/grid/grid-breakpoints-light.svg?fit=max\&auto=format\&n=zRpidP9a1v6VjEnn\&q=85\&s=927cd3c812154d5601e5ef97c4a2b6a5)

BEEQ breakpoints overview

***

## How grid works in code

Use native CSS Grid for page structure and BEEQ spacing tokens for gutters, margins, and padding. CSS Grid is broadly supported and robust enough for most product layouts, so BEEQ keeps the grid guidance framework-agnostic instead of shipping layout-specific utilities.

```css CSS icon="css" theme={"theme":{"light":"one-light","dark":"night-owl"}}
.content-container {
  max-inline-size: 46rem;
  margin-inline: auto;
  padding-block: var(--bq-spacing-xl);
  padding-inline: clamp(var(--bq-spacing-m), 4vw, var(--bq-spacing-xl));
}
```

```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
<article class="content-container">
  <h2>Centered content container</h2>
  <p>
    Use max-inline-size to control reading width, margin-inline to center the region, and BEEQ spacing tokens for responsive edge spacing.
  </p>
</article>
```

Use gutters to separate layout regions. Do not place content inside the gutter itself.

```css CSS icon="css" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
.gutter-example {
  display: grid;
  gap: var(--bq-spacing-l);
  max-inline-size: 48rem;
  margin-inline: auto;
}

.gutter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bq-spacing-m);
}

.gutter-item {
  padding: var(--bq-spacing-m);
  border: var(--bq-stroke-s) solid var(--bq-stroke--primary);
  border-radius: var(--bq-radius--s);
  background: var(--bq-background--secondary);
}

.gutter-item h3 {
  font-size: var(--bq-font-size--l);
  line-height: var(--bq-font-line-height--regular);
}
```

```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
<section class="gutter-example">
  <div>
    <h2>Gutters use the spacing scale</h2>
    <p>Each card stays inside its column. The gap creates separation between regions.</p>
  </div>
  <div class="gutter-row">
    <article class="gutter-item">
      <h3>Column 1</h3>
      <p>Content begins inside the column.</p>
    </article>
    <article class="gutter-item">
      <h3>Column 2</h3>
      <p>The gutter remains empty space.</p>
    </article>
    <article class="gutter-item">
      <h3>Column 3</h3>
      <p>Spacing uses BEEQ tokens.</p>
    </article>
  </div>
</section>
```

***

## Container strategies

Containers control how wide a layout can become and how it responds to available space. Choose the strategy that protects the content, not the one that fills the most pixels.

![Fluid](https://www.beeq.design/foundations/images/grid/grid-container-fluid-light.svg)
![Fluid](https://www.beeq.design/foundations/images/grid/grid-container-fluid-dark.svg)

## Fluid

Fluid containers stretch with the viewport. Use them for product screens, dashboards, and layouts where content can safely use more horizontal space.

![Fixed](https://www.beeq.design/foundations/images/grid/grid-container-fixed-light.svg)
![Fixed](https://www.beeq.design/foundations/images/grid/grid-container-fixed-dark.svg)

## Fixed

Fixed containers keep a specific width. Use them for focused workflows, reading surfaces, or regions that become harder to scan when they stretch.

> [card] Hybrid
>
> Hybrid containers are fluid up to a maximum width. Use them when the layout should adapt on smaller screens but stop growing when content reaches a comfortable width.

***

## Responsive and adaptive layouts

Responsive and adaptive layouts both help interfaces work across screen sizes. The difference is how much the layout changes.

### Responsive

Responsive layouts use one content structure that reflows as space changes. This is the default approach for most BEEQ product screens because it keeps behavior predictable and avoids duplicate markup.

![Responsive layout - light mode](https://mintcdn.com/beeq/zRpidP9a1v6VjEnn/foundations/images/grid/grid-layout-responsive-light.svg?fit=max\&auto=format\&n=zRpidP9a1v6VjEnn\&q=85\&s=2b93bbc6c787c1850db71f00b9655df2)

Responsive layout

```css CSS icon="css" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
.responsive-layout {
  display: grid;
  gap: var(--bq-spacing-m);
  max-inline-size: 56rem;
  margin-inline: auto;
}

.responsive-card {
  display: grid;
  gap: var(--bq-spacing-xs);
  padding: var(--bq-spacing-m);
  border: var(--bq-stroke-s) solid var(--bq-stroke--primary);
  border-radius: var(--bq-radius--s);
  background: var(--bq-background--secondary);
}

.responsive-card h3 {
  font-size: var(--bq-font-size--l);
  line-height: var(--bq-font-line-height--regular);
}

@media (min-width: 40rem) {
  .responsive-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
```

```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
<section class="responsive-layout" aria-label="Stacked to columns responsive layout">
  <article class="responsive-card">
    <h3>Profile</h3>
    <p>Stacks first on narrow screens.</p>
  </article>
  <article class="responsive-card">
    <h3>Security</h3>
    <p>Moves into columns when space allows.</p>
  </article>
  <article class="responsive-card">
    <h3>Billing</h3>
    <p>Keeps the same source order in both layouts.</p>
  </article>
</section>
```

### Adaptive

Adaptive layouts use different structures for different contexts. Use them when a screen needs a meaningfully different experience by device, input method, or available space.

![Adaptive layout - light mode](https://mintcdn.com/beeq/zRpidP9a1v6VjEnn/foundations/images/grid/grid-layout-adaptive-light.svg?fit=max\&auto=format\&n=zRpidP9a1v6VjEnn\&q=85\&s=46ead8169456b2e7ec079f6eb95d17c2)

Adaptive layout

***

## Usage guidelines

> [accordion] Keep content aligned to columns
>
> Align layout regions to column edges. This keeps scanning predictable and avoids uneven relationships between adjacent content.

> [accordion] Use gutters as separation
>
> Keep gutters empty. Place content inside columns, then use gutter spacing to separate neighboring regions.

> [accordion] Use BEEQ spacing tokens
>
> Use `--bq-spacing-*` values for gutters, margins, and container padding. If your application uses BEEQ's Tailwind preset, the same spacing scale is available through spacing utilities, but the grid structure remains yours to define.

> [accordion] Change layout when content needs it
>
> Add breakpoints when content becomes cramped, hard to compare, or difficult to read. Avoid creating a new layout for every viewport range.

> [accordion] Prefer fluid containers for product screens
>
> Product layouts often need to use available space for tables, forms, and dashboards. Add max widths when the content becomes harder to scan.

> [accordion] Use fixed widths for focused tasks
>
> Fixed or max-width containers work well for reading, setup flows, forms, and review screens where excessive line length slows users down.

> [accordion] Preserve source order when layouts reflow
>
> Keep the DOM order meaningful so keyboard, screen reader, and small-screen users encounter content in the same logical sequence.

***

## Accessibility

Grid accessibility depends on preserving meaning when the visual layout changes.

* Keep source order logical. Do not use visual placement to make screen reader or keyboard users jump across unrelated content.
* Support zoom and narrow viewports without horizontal scrolling for core page content.
* Avoid using position alone to communicate priority, state, or relationships. Pair layout with headings, labels, and text.
* Keep long text in comfortable containers. Wide grids should not force paragraphs into lines that are hard to read.
* Test responsive changes with keyboard navigation so focus order still matches the user's reading path.

***

## Resources

> [card] [Global CSS variables](https://www.beeq.design/theming/global-css-variables.md)
>
> Review the spacing and layout-related custom properties used by BEEQ themes.

> [card] [Spacing token source](https://github.com/Endava/BEEQ/blob/main/packages/beeq/src/global/styles/foundations/themes/beeq.scss)
>
> See the source that defines the BEEQ spacing values used for gutters, margins, and layout rhythm.


## Related topics

- [Spacing](https://www.beeq.design/foundations/spacing.md)
- [Date Picker](https://www.beeq.design/components/date-picker.md)
- [Table](https://www.beeq.design/components/table.md)
- [Global CSS Variables](https://www.beeq.design/theming/global-css-variables.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.