Skip to content

Sizing

Width and height work like spacing โ€” w and h, plus a value. min- and max- prefixes are supported for both axes.

Width

ClassCSS
chai-w-0width: 0px
chai-w-100width: 100px
chai-w-fullwidth: 100%
chai-w-halfwidth: 50%
chai-w-autowidth: auto
chai-w-screen-wwidth: 100vw
chai-w-[60ch]width: 60ch
chai-w-[calc(100%-2rem)]width: calc(100% - 2rem)

Height

ClassCSS
chai-h-0height: 0px
chai-h-12height: 12px
chai-h-fullheight: 100%
chai-h-screen-hheight: 100vh
chai-h-[480px]height: 480px

Min and max

Add min- or max- in front of the axis letter.

ClassCSS
chai-min-w-200min-width: 200px
chai-min-h-screen-hmin-height: 100vh
chai-max-w-[60ch]max-width: 60ch
chai-max-h-[80vh]max-height: 80vh

Keyword shortcuts

TokenResolves to
full100%
half50%
autoauto
screen-w100vw
screen-h100vh

Made by Saad ยท @developedbysaad on X