Skip to content

Justify Self

Align single grid item on inline axis

Syntax

layout="justify-self:[value]"

Values

ValueCSS OutputDescription
autojustify-self: autoAuto alignment
startjustify-self: startStart alignment
endjustify-self: endEnd alignment
centerjustify-self: centerCenter alignment
stretchjustify-self: stretchStretch item

Examples

html
<div layout="justify-self:end">End aligned</div>

Preview

Justify Self

layout="justify-self:center" - Override horizontal alignment for one grid item

Defaultcenterend
View Code
html
<div layout="grid grid-cols:3" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <span space="p:small" visual="bg:neutral-300 dark:bg:neutral-700 text:neutral-800 dark:text:neutral-200 rounded:small">Default</span>
  <span layout="justify-self:center" space="p:small" visual="bg:primary text:white rounded:small">center</span>
  <span layout="justify-self:end" space="p:small" visual="bg:primary text:white rounded:small">end</span>
</div>