Skip to content

Justify Content

Align items along the main axis

Syntax

layout="justify:[value]"

Values

ValueCSS OutputDescription
startjustify-content: flex-startAlign to start
endjustify-content: flex-endAlign to end
centerjustify-content: centerCenter items
betweenjustify-content: space-betweenSpace between items
aroundjustify-content: space-aroundSpace around items
evenlyjustify-content: space-evenlyEven spacing
stretchjustify-content: stretchStretch items

Examples

html
<div layout="flex justify:center">Centered</div>
<div layout="flex justify:between">Spaced</div>

Preview

Justify Start

layout="justify:start" - Items aligned to the start of container

123
View Code
html
<div layout="flex justify:start" 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>

Justify Center

layout="justify:center" - Items centered along the main axis

123
View Code
html
<div layout="flex justify: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>

Justify Between

layout="justify:between" - Items with equal space between them

123
View Code
html
<div layout="flex justify:between" 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>