Skip to content

layoutMode

Whether the element stacks its children, and along which axis.

Path

…elements.<element>.styles.layoutMode

Elements Supported

component · container · slot

Value

  • "NONE" (default) — No auto-layout. Children are placed by their own coordinates rather than stacked.
  • "HORIZONTAL" — Children stack along the inline axis.
  • "VERTICAL" — Children stack along the block axis.
  • "GRID" — Children fill cells of equal tracks on the templated axis, in source order.

Platform bindings

Figma

Disposition: bound · Realised by: rule wrapping

CSS

Disposition: bound · Realised by: rule autoLayout

Resolved jointly with

This key does not map on its own. Its rule’s ordered case table is linked above.

wrapping — Figma

autoLayout — CSS

Decisions

  • ADR-038 — Tighten layoutMode to String Literal Enum
  • ADR-041 — Layout Positioning — Constraint-Based Naming
  • ADR-070 — Explicit position: ABSOLUTE for Children of Non-Auto-Layout Parents
  • ADR-076 — Promoting a Container, and a Platform-Level stylesProp
  • ADR-090 — Container Promotion Sources Opened to Closed-Value Layout Properties
  • ADR-113 — Style defaults belong to the schema

Rules

RuleStatement
DSPEC-44Every property of Styles declares a default, and its value validates against that property’s own schema
DSPEC-45A declared default is a literal, never a TokenReference, PropBinding or Conditional
DSPEC-47Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose
DSPEC-72Wrapper collapse carries the grid track keys with the layoutMode they complete, and distributes that group to the slot box alone when the mode is GRID

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11