Skip to content

Display

Control the display type of elements

Syntax

layout="[display-value]"

Values

ValueCSS OutputDescription
flexdisplay: flexFlexbox container
inline-flexdisplay: inline-flexInline flexbox container
griddisplay: gridGrid container
inline-griddisplay: inline-gridInline grid container
blockdisplay: blockBlock element
inlinedisplay: inline-blockInline block element
hiddendisplay: noneHidden element

Examples

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

Preview

Flexbox Container

layout="flex" - Items arranged horizontally

Item 1Item 2Item 3
View Code
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>

Grid Container

layout="grid" - Items in a grid layout

123456
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: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>