Skip to content

Shorthand Alignment

Quick alignment shortcuts

Syntax

layout="[alignment]"

Values

ValueCSS OutputDescription
centerjustify-content: center; align-items: centerCenter both axes
startjustify-content: flex-start; align-items: flex-startAlign to start
endjustify-content: flex-end; align-items: flex-endAlign to end
betweenjustify-content: space-betweenSpace between
aroundjustify-content: space-aroundSpace around
evenlyjustify-content: space-evenlyEven spacing

Examples

html
<div layout="flex center">Centered content</div>

Preview

Center Shorthand

layout="center" - Center items on both axes at once

Centered
View Code
html
<div layout="flex center" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 100px;">
  <span space="p:small" visual="bg:primary text:white rounded:small">Centered</span>
</div>

Between Shorthand

layout="between" - Quick space-between layout

LeftRight
View Code
html
<div layout="flex between" space="p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <span space="p:small" visual="bg:primary text:white rounded:small">Left</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">Right</span>
</div>