Skip to content

Justify Items

Align grid items on inline axis

Syntax

layout="justify-items:[value]"

Values

ValueCSS OutputDescription
startjustify-items: startStart alignment
endjustify-items: endEnd alignment
centerjustify-items: centerCenter alignment
stretchjustify-items: stretchStretch items

Examples

html
<div layout="grid justify-items:center">Centered items</div>

Preview

Justify Items Center

layout="justify-items:center" - Center all grid items horizontally within their cells

123
View Code
html
<div layout="grid grid-cols:3 justify-items:center" 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">1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">2</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">3</span>
</div>