Skip to content

Justify Content

Jajarkan item sepanjang paksi utama

Sintaks

layout="justify:[value]"

Nilai

NilaiCSS OutputHuraian
startjustify-content: flex-startJajar ke permulaan
endjustify-content: flex-endJajar ke hujung
centerjustify-content: centerTengahkan item
betweenjustify-content: space-betweenRuang antara item
aroundjustify-content: space-aroundRuang sekeliling item
evenlyjustify-content: space-evenlyRuang sekata
stretchjustify-content: stretchRegangkan item

Contoh

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

Pratonton

Jajar Permulaan

layout="justify:start" - Item dijajarkan ke permulaan bekas

123
Lihat Kod
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>

Jajar Tengah

layout="justify:center" - Item berpusat sepanjang paksi utama

123
Lihat Kod
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>

Jajar Antara

layout="justify:between" - Item dengan ruang sama antara mereka

123
Lihat Kod
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>