Skip to content

Grid Rows

Define grid template rows

Syntax

layout="grid-rows:[value]"

Values

ValueCSS OutputDescription
1-12grid-template-rows: repeat({n}, minmax(0, 1fr))N equal rows
nonegrid-template-rows: noneNo rows defined
subgridgrid-template-rows: subgridUse parent grid

Examples

html
<div layout="grid grid-rows:3">3 rows</div>

Preview

Grid Rows

layout="grid-rows:3" - Define explicit row tracks in a grid

123456
View Code
html
<div layout="grid grid-rows:3 grid-cols:2" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">2</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">3</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">4</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">5</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">6</span>
</div>