Skip to content

Layout — Grid

grid switches display: grid. Gap tokens are shared with Flex.

1
2
3
span:2
4
<div and-layout="grid cols:3 gap:sm">
<div>1</div>
<div>2</div>
<div>3</div>
<div and-layout="span:2">span:2</div>
<div>4</div>
</div>
TokenRange / valuesCSS property
cols:*112grid-template-columns: repeat(n, minmax(0, 1fr))
span:*112, fullgrid-column (full = 1 / -1)
col-start:*113, autogrid-column-start
col-end:*113, autogrid-column-end

cols:*, span:*, col-start:*, col-end:*, and gap* all accept a @breakpoint suffix — see Overview → Responsive for the breakpoint table. The bare grid switch itself does not: there’s no grid@md, so this package can’t flip a container from flex to grid at a breakpoint on its own.

Recipes — the responsive card grid and sidebar shell patterns build on cols/span directly.