OGXOGX

Layout Classes

Flexbox, position, and display utilities

Display

ClassCSS Output
flexdisplay: flex
hiddendisplay: none

Flexbox Direction

ClassCSS Output
flex-rowflex-direction: row
flex-colflex-direction: column
flex-row-reverseflex-direction: row-reverse
flex-col-reverseflex-direction: column-reverse

Flex Wrap

ClassCSS Output
flex-wrapflex-wrap: wrap
flex-nowrapflex-wrap: nowrap

Flex Grow & Shrink

ClassCSS Output
flex-1flex: 1 1 0%
flex-autoflex: 1 1 auto
flex-initialflex: 0 1 auto
flex-noneflex: 0 0 auto
growflex-grow: 1
grow-0flex-grow: 0
shrinkflex-shrink: 1
shrink-0flex-shrink: 0

Align Items

ClassCSS Output
items-startalign-items: flex-start
items-centeralign-items: center
items-endalign-items: flex-end
items-baselinealign-items: baseline
items-stretchalign-items: stretch

Justify Content

ClassCSS Output
justify-startjustify-content: flex-start
justify-centerjustify-content: center
justify-endjustify-content: flex-end
justify-betweenjustify-content: space-between
justify-aroundjustify-content: space-around
justify-evenlyjustify-content: space-evenly

Align Self

ClassCSS Output
self-autoalign-self: auto
self-startalign-self: flex-start
self-centeralign-self: center
self-endalign-self: flex-end
self-stretchalign-self: stretch
self-baselinealign-self: baseline

Position

ClassCSS Output
relativeposition: relative
absoluteposition: absolute

Inset

ClassDescription
inset-{n}All sides (top, right, bottom, left)
inset-0top: 0; right: 0; bottom: 0; left: 0
top-{n}Top position
right-{n}Right position
bottom-{n}Bottom position
left-{n}Left position

Example: Centered Layout

stack('flex items-center justify-center w-full h-full', [
  span('text-6xl', 'Centered Content')
])

Example: Space Between

row('flex justify-between items-center w-full p-8', [
  span('text-xl', 'Left'),
  span('text-xl', 'Right')
])

On this page