Skip to content
Inkoxide

Search covers every page and heading of the docs. Use ↑ ↓ and ↵.

Tailwind classes

Which Tailwind v4 utilities a className can use with @inkoxide/tailwind installed, and what they become.

Edit this page

Classes are compiled by the real Tailwind v4 compiler: every class is turned into CSS by Tailwind and the CSS is mapped to the engine's style properties. A class works when every CSS property it produces has an engine equivalent. The table below lists the families that are supported and tested; each example is a unit test.

  • Lengths are points: 1rem = 12pt, 1px = 0.75pt. p-4 is 12pt, text-base 12pt. Use arbitrary values for exact sizes: text-[10.5pt], p-[5pt_7pt].
  • Arbitrary lengths read as in the style prop: any absolute unit, calc(), and em (the element's font size; in text-[…], the inherited one), vw and vh (1% of the page's width and height): w-[2em], h-[10vh].
  • Arbitrary values ([…]) work for every supported property.
  • In development an unsupported class throws, naming the class and the CSS property; in production it is logged once and ignored.
  • Text utilities on Page, View, Cell or Row are inherited by the text inside.

Layout

UtilitiesEngine propertyExample → resultNotes
flex, grid, hiddendisplayflex → {"display":"flex"}View is already flex + column. block, inline and contents are not supported.
float-left, float-right, float-none, clear-left, clear-right, clear-both, clear-nonefloat, clearfloat-left → {"float":"left"}In a column View, a Page or a table cell (not in a row or a grid, and not on a cell itself): text after a float wraps beside it, boxes after it are narrowed beside it or moved below it. float-start, float-end, clear-start and clear-end are not supported.
overflow-hidden, overflow-visible, overflow-clipoverflowoverflow-hidden → {"overflow":"hidden"}
align-top, align-middle, align-bottomverticalAlign (on Cell)align-top → {"verticalAlign":"top"}

Flexbox

UtilitiesEngine propertyExample → resultNotes
flex-row, flex-col, flex-row-reverse, flex-col-reverseflexDirectionflex-row → {"flexDirection":"row"}
flex-wrap, flex-nowrap, flex-wrap-reverseflexWrapflex-wrap → {"flexWrap":"wrap"}
flex-1, flex-auto, flex-initial, flex-noneflexGrow, flexShrink, flexBasisflex-1 → {"flexGrow":1,"flexShrink":1,"flexBasis":"0%"}
grow, grow-0, shrink, shrink-0, basis-*flexGrow, flexShrink, flexBasisgrow → {"flexGrow":1}
justify-*justifyContentjustify-start → {"justifyContent":"flex-start"}
items-*alignItemsitems-start → {"alignItems":"flex-start"}
self-*alignSelfself-auto → {"alignSelf":"auto"}
content-*alignContentcontent-start → {"alignContent":"flex-start"}
gap-*, gap-x-*, gap-y-*rowGap, columnGapgap-4 → {"rowGap":12,"columnGap":12}

Grid

UtilitiesEngine propertyExample → resultNotes
grid-cols-N, grid-cols-[…], grid-rows-N, grid-rows-[…]gridTemplateColumns, gridTemplateRowsgrid-cols-2 → {"gridTemplateColumns":[{"repeat":2,"tracks":[{"min":0,"max":"1fr"}]}]}grid-cols-3 is repeat(3, minmax(0, 1fr)), as in CSS.
col-span-*, col-start-*, col-end-*, row-span-*, row-start-*, row-end-*gridColumn, gridRowcol-span-2 → {"gridColumn":{"span":2}}A start and an end line replace a span, as in CSS: col-span-3 col-start-1 col-end-3 is 1 / 3.
grid-flow-*, auto-cols-*, auto-rows-*gridAutoFlow, gridAutoColumns, gridAutoRowsgrid-flow-col → {"gridAutoFlow":"column"}
justify-items-*, justify-self-*justifyItems, justifySelfjustify-items-center → {"justifyItems":"center"}

Spacing

UtilitiesEngine propertyExample → resultNotes
p-*, px-*, py-*, pt-*, pr-*, pb-*, pl-*, ps-*, pe-*paddingp-4 → {"paddingTop":12,"paddingRight":12,"paddingBottom":12,"paddingLeft":12}Arbitrary values take one to four lengths: p-[5pt_7pt].
m-*, mx-*, my-*, mt-*, mr-*, mb-*, ml-*, -m*-*, m*-automarginm-2 → {"marginTop":6,"marginRight":6,"marginBottom":6,"marginLeft":6}

Sizing

UtilitiesEngine propertyExample → resultNotes
w-*, h-*, size-*width, heightw-full → {"width":"100%"}Fractions become percentages. w-fit, w-min and w-max are not supported.
min-w-*, max-w-*, min-h-*, max-h-*minWidth, maxWidth, minHeight, maxHeightmin-w-0 → {"minWidth":0}
w-screen, h-screen, min-w-screen, min-h-screen, max-w-screen, max-h-screenwidth, height, minWidth, minHeight, maxWidth, maxHeightw-screen → {"width":595.28}The page's width or height (100vw, 100vh); the examples are on an A4 page. dvh, svh, lvh (h-dvh) and dvw, svw, lvw are not supported.
aspect-*aspectRatioaspect-square → {"aspectRatio":1}

Position

UtilitiesEngine propertyExample → resultNotes
relative, absolutepositionrelative → {"position":"relative"}fixed and sticky are not supported. To repeat an element on every page, use Header/Footer, or the fixed prop with absolute.
inset-*, inset-x-*, inset-y-*, top-*, right-*, bottom-*, left-*insetinset-0 → {"insetTop":0,"insetRight":0,"insetBottom":0,"insetLeft":0}

Visual

UtilitiesEngine propertyExample → resultNotes
bg-* (colour, /alpha, arbitrary)backgroundColor (page background on Page)bg-white → {"backgroundColor":[1,1,1,1]}Tailwind colours are oklch; they are converted to sRGB and clamped.
opacity-*opacityopacity-50 → {"opacity":0.5}
rotate-*, -rotate-*rotaterotate-45 → {"rotate":45}
translate-*, translate-x-*, translate-y-*, -translate-*transform (translate)translate-x-2 → {"translate":[6,0]}Percentages are of the element's own box, as in CSS.
scale-*, scale-x-*, scale-y-*transform (scale)scale-110 → {"scale":[1.1,1.1]}
skew-*, skew-x-*, skew-y-*, transform-[…], transform-nonetransformskew-x-12 → {"transform":[{"skew":[12,0]}]}Composed in CSS order: translate, rotate, scale, then transform. 3D functions (rotate-x-*, perspective-*) are not supported.
origin-*transformOriginorigin-center → {"transformOrigin":["50%","50%"]}
z-*, -z-*, z-autozIndexz-10 → {"zIndex":10}Paint order among siblings; not on table cells.
object-contain, object-cover, object-fill, object-noneimage fitobject-contain → {"objectFit":"contain"}On Image and ImageBackground only. The fit prop wins over it.
object-left, object-right, object-top, object-bottom, object-center, object-left-top (and the other corners, either order), object-[…]image objectPositionobject-left-top → {"objectPosition":{"x":"left","y":"top"}}On Image and ImageBackground only: places a contain, cover or none image in its box. Arbitrary values take one or two keywords, lengths or percentages; edge offsets (right_1rem_top) are not supported.

Border

UtilitiesEngine propertyExample → resultNotes
border, border-N, border-{t,r,b,l,x,y}, border-{t,r,b,l,x,y}-N, border-0, border-noneborderWidthborder → {"borderStyle":"solid","borderTopWidth":0.75,"borderRightWidth":0.75,"borderBottomWidth":0.75,"borderLeftWidth":0.75}Without a colour utility the border takes the text colour (CSS currentColor), as in the browser.
border-{colour}, border-{t,r,b,l,x,y}-{colour}borderColorborder-neutral-300 → {"borderTopColor":[0.831444,0.831444,0.831444,1],"borderRightColor":[0.831444,0.831444,0.831444,1],"borderBottomColor":[0.831444,0.831444,0.831444,1],"borderLeftColor":[0.831444,0.831444,0.831444,1]}
border-solid, border-dashed, border-dotted, [border-top-style:…]borderStyleborder-solid → {"borderStyle":"solid"}Tailwind has no per-side style utilities; use an arbitrary property (or the style prop) for one side.
rounded, rounded-*, rounded-{t,r,b,l,s,e}-*, rounded-{tl,tr,br,bl,ss,se,es,ee}-*borderRadiusrounded → {"borderRadius":3}Logical corners (s, e) assume left-to-right. Elliptical corners are not supported.
border-collapse, border-separate, border-spacing-*borderCollapse, borderSpacing (on Table)border-collapse → {"borderCollapse":"collapse"}

Text

UtilitiesEngine propertyExample → resultNotes
align-super, align-sub, align-baselinerun verticalAlign (on Text)align-super → {"verticalAlign":"super"}Raises or lowers the baseline by the font's superscript or subscript offset; the size stays: add a smaller text-*.
align-text-top, align-text-bottom, and align-top, align-middle, align-bottomrun verticalAlign (on an Image in a Text)align-text-top → {"verticalAlign":"textTop"}Places an image in its line: its top at the font's ascender, its bottom at the descender, its top or bottom at the line's, or its middle half an x-height above the baseline.
text-{size}, text-[11pt], text-{size}/{leading}run size (and lineHeight when the size utility sets one)text-xs → {"fontSize":9,"lineHeight":{"mult":1.333333}}text-base is 12pt. Named sizes also set Tailwind's line height; leading-* overrides it.
font-sans, font-serif, font-mono, font-display, font-[…]run font (through the FontRegistry)font-sans → {"fontFamily":["Inter","Noto Sans"]}The first family of the stack that is registered wins. No serif face is bundled, so the default theme sets font-serif to Noto Sans: register a serif and set --font-serif in your theme.
font-thin … font-black, font-[650]run font (weight)font-light → {"fontWeight":300}A missing weight falls back to the nearest registered one.
italic, not-italicrun font (style)italic → {"fontStyle":"italic"}
text-{colour}, text-[#…]run colortext-black → {"color":[0,0,0,1]}
text-left, text-center, text-right, text-justify, text-start, text-endtextAligntext-left → {"textAlign":"left"}
leading-*lineHeightleading-none → {"lineHeight":{"mult":1}}Unitless values are multipliers; lengths (leading-6) are divided by the text size. Without any leading-*, the engine uses the font's natural line height (no preflight 1.5).
tracking-*run letterSpacingtracking-wide → {"letterSpacing":{"em":0.025}}
font-features-[…]run fontFeaturesfont-features-['tnum','ss01'] → {"fontFeatureSettings":{"tnum":1,"ss01":1}}CSS font-feature-settings, with _ for spaces: font-features-['tnum','ss01'].
tabular-nums, proportional-nums, lining-nums, oldstyle-nums, slashed-zero, ordinal, diagonal-fractions, stacked-fractions, normal-numsrun fontFeaturestabular-nums → {"fontVariantNumeric":{"tnum":1}}The OpenType features of CSS font-variant-numeric (tnum, pnum, lnum, onum, zero, ordn, frac, afrc): the font must have them. font-features-[…] wins over them.
underline, line-through, no-underlinerun decorationunderline → {"textDecoration":"underline"}
decoration-{colour}, decoration-N, decoration-{solid,double,dotted,dashed,wavy}run decorationColor, decorationThickness, decorationStyledecoration-red-500 → {"decorationColor":[0.982661,0.171797,0.21307,1]}overline and underline-offset-* are not supported.
indent-*, -indent-*textIndentindent-4 → {"textIndent":12}A negative indent hangs the first line.
[direction:rtl], [orphans:N], [widows:N]direction, orphans, widows[direction:rtl] → {"direction":"rtl"}Also the dir, orphans and widows props on Text.
uppercase, lowercase, capitalize, normal-caserun text (transformed by the tree builder with the document lang)uppercase → {"textTransform":"uppercase"}
truncate, line-clamp-N, line-clamp-nonemaxLines + ellipsistruncate → {"maxLines":1,"ellipsis":true}
whitespace-normal, whitespace-nowrap, whitespace-pre, whitespace-pre-wrap, whitespace-pre-linewhiteSpacewhitespace-normal → {"whiteSpace":"normal"}
text-wrap, text-pretty, text-nowraptextWrap, whiteSpacetext-wrap → {"textWrap":"wrap"}text-pretty breaks lines over the whole paragraph for even lines (textWrap: pretty); text-nowrap is whiteSpace: nowrap.
hyphens-auto, hyphens-manual, hyphens-nonehyphenatehyphens-auto → {"hyphenate":true}The hyphenate prop on Text does the same. Soft hyphens (U+00AD) always work.

Not supported

ExampleWhy
md:p-4Variants and breakpoints (md:, hover:, print:) have no meaning in a PDF.
shadow-mdShadows (shadow-*, ring-*) are not drawn by the engine.
ring-2Shadows (shadow-*, ring-*) are not drawn by the engine.
space-x-2space-x/y and divide-* style child elements; use gap-* and borders.
divide-yspace-x/y and divide-* style child elements; use gap-* and borders.
bg-linear-to-rGradients and background images.
rotate-x-123D transforms and perspective-*.
blockdisplay other than flex, grid and none.
fixedfixed and sticky positioning; the fixed prop with absolute repeats an element on every page.
w-fitIntrinsic sizes (fit, min, max).
h-dvhDynamic, small and large viewport units (dvh, svh, lvh); h-screen is the page height.
rounded-[4pt/8pt]Elliptical corners.
overlineoverline and underline-offset-*.
whitespace-break-spacesbreak-spaces.
text-ellipsistext-overflow alone; use truncate or line-clamp-N.
float-startfloat-start and float-end: boxes have no direction; use float-left or float-right.
clear-endclear-start and clear-end; use clear-left, clear-right or clear-both.
text-balancetext-wrap: balance; text-pretty evens lines.
object-scale-downobject-fit: scale-down.
object-[right_1rem_top]object-position with edge offsets.
not-a-classClasses Tailwind does not know.

Missing something? Open an issue with the class and the output you expect.

Synced from docs/TAILWIND_SUPPORT.md in the inkoxide repository.