Components/Layout
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/layout
Layout is a wrapper component that allows users to arrange children items in a grid of columns and rows. It's based on the CSS grid.
<Page/> .<Card/> .<Box/> instead.The component consists of 2 core parts:
<Layout/> wrapper that defines the total number of columns in the container, the default is 12 columns.<Cell/> that contains any type of content (for example, a form field). The user can define how many columns and rows it spans, the default is 12 columns and 1 row.Use span to control the width of a content <Cell/>,by specifying the number of grid columns a cell will occupy. If not specified, it will occupy all 12 columns (full width).
Use rows to specify the number of grid rows the <Cell/> occupies, the default is 1 row.
The height of rows inside a layout can be set individually or altogether:
rowHeight=1fr or set them in pixels, with rowHeight.Control the space between content cells with gap property. The same gap is applied horizontally and vertically (between rows and columns).
The default gap value is 24px.
By default, all cells inside of the row stretch vertically according to the cell of the greatest height in the row.
Size each cell separately according to its content and align it vertically with alignItems, it supports all CSS values.
By default, cells inside of the row stretch horizontally.
Size each cell separately according to its content and align it horizontally with justifyItems prop.
It supports all CSS values.
Use layout to arrange content in columns and rows inside of cards and widgets.
Use layout to arrange content inside of a page. Check <Page/> for all common layouts.
| Name | Type | Default | Description |
|---|---|---|---|
alignItems | "center" | "end" | "start" | string & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "baseline" | "normal" | "flex-end" | "flex-start" | "self-end" | "self-start" | "stretch" | — | Aligns grid items on the Y axis. |
children | ReactNode | — | Accept single or multiple compound |
cols | number | — | Set a number of grid columns to be rendered. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
gap | string | number | string & {} | 24px | Control both vertical and horizontal distance between layout cells. |
height | string | number | string & {} | — | Set the height of the layout. |
justifyItems | "center" | "end" | "start" | "right" | "left" | string & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "baseline" | "normal" | "flex-end" | "flex-start" | "self-end" | "self-start" | "legacy" | "stretch" | — | Align grid items on the X axis. |
rowHeight | string | number | string & {} | auto | Set all rows to have the same height in pixels or percentage. |
No testkit for this component — it doesn't expose a unidriver testkit.
Last updated: 22 October 2026