> For the complete documentation index, see [llms.txt](https://docs.realmacsoftware.com/elements-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmacsoftware.com/elements-docs/using-elements/components/layout-components/grid.md).

# Grid

The Grid component creates responsive layouts with defined columns and rows. It is ideal when content needs to align in two dimensions, such as card grids, galleries, feature comparisons, and structured page sections.

{% embed url="<https://youtu.be/BFIvsNwJT7k>" %}

👉🏻 [Open the Grid Project in Elements](elementsapp://downloadDocument/sJeeTVNqG8Er) that was used in this video.

### How to Use Grid

You’ll find Grid under **Layout** in the Components list.

1. Drag **Grid** onto the page.
2. Add Containers or other components to the grid.
3. Set the number of columns and rows.
4. Adjust horizontal and vertical gaps.
5. Select a child Container and set it to act as a Grid Item when it should span specific columns or rows.

{% hint style="info" %}
A newly added Grid may not look divided until it contains child components. Enable **Preview Columns** while editing to make the structure easier to see.
{% endhint %}

### Component Settings

#### Tags

Add tag titles when the Grid itself should be controlled by Filter or Filter Tags.

#### Filter

Enable filtering to make the Grid a filterable item. Choose parent or custom grouping and a Dim, Zoom Out, or Slide transition.

#### Columns & Rows

**Preview Columns** displays the grid structure in Edit mode. It does not affect the published page.

**Horizontal Gap** and **Vertical Gap** set spacing between cells. Both default to theme spacing 2.

**Columns** sets between 1 and 12 columns and defaults to 4.

**Rows** can be Auto or a fixed value from 1 to 12. The default is Auto.

#### Grid Alignment

**Auto Flow**

* **Row** — Places items by row. This is the default.
* **Column** — Places items by column.
* **Dense** — Attempts to fill earlier gaps.
* **Row Dense** and **Column Dense** — Combine a direction with dense placement.

**Auto Cols** and **Auto Rows** size automatically created tracks. Options are None, Auto, Min Content, Max Content, and 1 Fr.

**Justify Content** and **Align Content** position the grid tracks within the component. **Justify Items** and **Align Items** position children inside their grid areas.

#### Link

The Link group can make the whole Grid clickable. Avoid using it when the Grid contains its own links or buttons.

### Tips and Best Practices

* **Start with fewer columns:** Four columns with one-column items is easier to manage than twelve columns unless you need finer spans.
* **Use child spans deliberately:** Set Containers to Grid Item only when they need explicit column or row placement.
* **Review every breakpoint:** Reduce column counts on narrow screens to keep content readable.

### Related Components

* [Flex](/elements-docs/using-elements/components/layout-components/flex.md) — Better suited to a single row or column.
* [Container](/elements-docs/using-elements/components/layout-components/container.md) — Can be configured as a Grid Item and span multiple tracks.

| Common Control                                                                                                     | Description                                                             |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| [Link](/elements-docs/using-elements/components/common-controls/link.md)                                           | Link to a page, resource, anchor, email address, or website.            |
| [Layout](/elements-docs/using-elements/components/common-controls/layout.md)                                       | Control positioning, stacking, visibility, overflow, and isolation.     |
| [Sizing](/elements-docs/using-elements/components/common-controls/sizing.md)                                       | Set width, height, and responsive size constraints.                     |
| [Spacing](/elements-docs/using-elements/components/common-controls/spacing.md)                                     | Add responsive margin and padding.                                      |
| [Typography & Text Styles](/elements-docs/using-elements/components/common-controls/typography-and-text-styles.md) | Control fonts, text spacing, decoration, colour, and semantic wrappers. |
| [Backgrounds](/elements-docs/using-elements/components/common-controls/backgrounds.md)                             | Apply colour, image, gradient, SVG, video, and hover backgrounds.       |
| [Transitions](/elements-docs/using-elements/components/common-controls/transitions.md)                             | Choose what animates and set its timing curve, duration, and delay.     |
| [Effects](/elements-docs/using-elements/components/common-controls/effects.md)                                     | Apply shadows, opacity, and hover effects.                              |
| [Filters](/elements-docs/using-elements/components/common-controls/filters.md)                                     | Apply blur, brightness, saturation, shadow, and backdrop effects.       |
| [Transforms](/elements-docs/using-elements/components/common-controls/transforms.md)                               | Scale, rotate, move, and skew components.                               |
| [Borders](/elements-docs/using-elements/components/common-controls/borders.md)                                     | Set border style, colour, opacity, width, radius, and hover states.     |
| [Advanced](/elements-docs/using-elements/components/common-controls/advanced.md)                                   | Add CSS classes and IDs, or change supported HTML tags.                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.realmacsoftware.com/elements-docs/using-elements/components/layout-components/grid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
