Layout

Components/Layout

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/layout

Overview

Copy

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.

Do

  • Use it to structure content inside of a <Page/> .
  • Use it to organize form fields inside of a <Card/> .

Don't

  • Don't use it to structure a list of items. Use <Box/> instead.

Feature examples

Structure

The component consists of 2 core parts:

  • A <Layout/> wrapper that defines the total number of columns in the container, the default is 12 columns.
  • A <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.
Copy

Columns

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).

Copy

Rows

Use rows to specify the number of grid rows the <Cell/> occupies, the default is 1 row.

Copy

Row height

The height of rows inside a layout can be set individually or altogether:

  • By default, each row is sized separately. The height is determined by the item of the greatest height within the row.
  • To size all rows equally, choose to set them according to the item of the greatest height within the layout by setting all of them to rowHeight=1fr or set them in pixels, with rowHeight.
Copy

Gap

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.

Copy

Align items

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.

Copy

Justify items

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.

Copy

Common use case examples

Card layout

Use layout to arrange content in columns and rows inside of cards and widgets.

Copy

Page layout

Use layout to arrange content inside of a page. Check <Page/> for all common layouts.

Copy

Code

Copy

Props

NameTypeDefaultDescription
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.
childrenReactNode—Accept single or multiple compound elements which store content items. Other nodes are accepted but not recommended.
colsnumber—Set a number of grid columns to be rendered.
dataHookstring—Applies a data-hook HTML attribute that can be used in the tests.
gapstring | number | string & {}24pxControl both vertical and horizontal distance between layout cells.
heightstring | 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.
rowHeightstring | number | string & {}autoSet all rows to have the same height in pixels or percentage.

Testkit

No testkit for this component — it doesn't expose a unidriver testkit.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.331.0 (2026-10-01) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.288.0 (2026-06-15) — maintenance release, no component-specific changes
  • 1.271.0 (2026-04-22) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.224.0 (2025-10-30) — maintenance release, no component-specific changes
  • 1.198.2 (2025-06-09) — fix: fix cannot be used as a JSX component error (#14969)
  • 1.198.1 (2025-06-09) — maintenance release, no component-specific changes
  • 1.188.1 (2025-05-14) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.93.0 (2024-02-08) — feat: introduce height property (#13262)
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?