layoutMode
Whether the element stacks its children, and along which axis.
Path
…elements.<element>.styles.layoutMode
Elements Supported
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: ABSOLUTEfor 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
| Rule | Statement |
|---|---|
| DSPEC-44 | Every property of Styles declares a default, and its value validates against that property’s own schema |
| DSPEC-45 | A declared default is a literal, never a TokenReference, PropBinding or Conditional |
| DSPEC-47 | Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose |
| DSPEC-72 | Wrapper 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
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/styles.schema.json |
| TypeScript | packages/schema/types/Styles.ts |
| Specification | §4.1a, §11 |