Malevich

Sections / Layout/

Grid-layout

Multi-column grid with auto-fit reflow.

Grid-layout

Multi-column grid that adapts to container width via auto-fit + minmax. Cells reflow into fewer columns as the container shrinks. Container-aware — no @media queries.

When to use

For asymmetric two-column layouts, use Split-layout. For ordered sequences in one direction, use Stack-layout.

Variants

Variant Behavior
Default auto-fit cells of min 16rem
data-cols="2" Up to 2 columns
data-cols="3" Up to 3 columns
data-cols="4" Up to 4 columns
data-cols="6" Up to 6 columns
.-tight Compact gap
.-loose Larger gap

Anatomy

<!-- Auto-fit: cells reflow based on container width -->
<section class="grid-layout">
  <article>Cell 1</article>
  <article>Cell 2</article>
  <article>Cell 3</article>
</section>

<!-- Max 4 columns -->
<section class="grid-layout" data-cols="4">
  <!-- ... -->
</section>

Tokens used

Component-tier (generated)