Skip to content

Display

Kawal jenis paparan elemen

Sintaks

layout="[display-value]"

Nilai

NilaiCSS OutputHuraian
flexdisplay: flexBekas flexbox
inline-flexdisplay: inline-flexBekas flexbox sebaris
griddisplay: gridBekas grid
inline-griddisplay: inline-gridBekas grid sebaris
blockdisplay: blockElemen blok
inlinedisplay: inline-blockElemen blok sebaris
hiddendisplay: noneElemen tersembunyi

Contoh

html
<div layout="flex">Flexbox container</div>
<div layout="grid">Grid container</div>
<div layout="hidden">Hidden element</div>

Pratonton

Bekas Flexbox

layout="flex" - Item disusun secara mendatar

Item 1Item 2Item 3
Lihat Kod
html
<div layout="flex row" 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">Item 1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">Item 2</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">Item 3</span>
</div>

Bekas Grid

layout="grid" - Item dalam susun atur grid

123456
Lihat Kod
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:primary text:white rounded:small" layout="text:center">1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">2</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">3</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">4</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">5</span>
  <span space="p:small" visual="bg:primary text:white rounded:small" layout="text:center">6</span>
</div>