Skip to content
Inkoxide

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

Tailwind classes

Which Tailwind v4 utilities a className (class in Vue, Svelte and Angular) can use with @inkoxide/tailwind installed, and what they become.

Edit this page

The code on this page is React’s. How Vue writes it
ReactVue
ClassesclassName="p-4"class="p-4"
PropsheaderRows={1}:header-rows="1" or :headerRows="1"
A prop that is truehyphenatehyphenate
Content per pagerender={({ pageNumber }) => …}<template #render="{ pageNumber, totalPages }">…</template>
The page, deeper downusePage()usePage() (it injects the page)
What to render<Invoice invoice={invoice} />h(Invoice, { invoice })
A template for generateTemplate: ComponentType<{ data }>Template: a component with the prop data

The rest, and Vue’s own API, is in the Vue guide.

The code on this page is React’s. How Svelte writes it
ReactSvelte
ClassesclassName="p-4"class="p-4" (a list or an object of flags too)
Content per pagerender={({ pageNumber }) => …}{#snippet render(page)}{page.pageNumber}{/snippet} inside the Text or View
The page, deeper downusePage()usePage(), while the component is created
What to render<Invoice invoice={invoice} />{ component: Invoice, props: { invoice } }
A template for generateTemplate: ComponentType<{ data }>Template: a component with the prop data

The rest, and Svelte’s own API, is in the Svelte guide.

The code on this page is React’s. How Angular writes it
ReactAngular
Components<View>, <Path>, <TextField><ink-view>, <ink-path>, <ink-text-field>: ink- and the name in kebab case
ClassesclassName="p-4"class="p-4", [class]="…"
PropsheaderRows={1}, size="A4"[headerRows]="1", size="A4" (an attribute is a string: bind numbers)
A prop that is truehyphenatehyphenate
Stylestyle={{ padding: 20 }}[style]="{ padding: 20 }"; [inkStyle] for @media blocks and lists of styles
Content per pagerender={({ pageNumber }) => …}[render]="footer" with <ng-template #footer let-page>{{ page.pageNumber }}</ng-template>
The page, deeper downusePage()injectPage()
What to render<Invoice invoice={invoice} />{ component: Invoice, inputs: { invoice } }
A template for generateTemplate: ComponentType<{ data }>Template: a component with the input data

The rest, and Angular’s own API, is in the Angular guide.

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.
  • Page variants (md:, landscape:, print:) read the page the element is on; see Page variants.
  • 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, and so does the text of a column View after it; an overflow-hidden box, a row, a grid or an image after it is narrowed beside it or moved below it. float-start, float-end, clear-start and clear-end are not supported.
[shape-outside:…], [shape-margin:…]shapeOutside, shapeMargin[shape-outside:circle(50%)] → {"shapeOutside":{"circle":{"radius":"50%"}}}Arbitrary properties on a float, as Tailwind has no utilities for them: circle(), ellipse(), inset() and polygon(), with _ for spaces. Lines beside the float wrap around the shape; the float is placed, and boxes beside it narrowed, by its margin box.
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}
fill-*, stroke-* (colours, none, current), stroke-<n>fill, stroke, strokeWidth: elements inside an <Svg> onlyfill-[#ff0000] → {"fill":[1,0,0,1]}
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.
font-stretch-condensed … font-stretch-ultra-expanded, font-stretch-75%fontStretchfont-stretch-condensed → {"fontStretch":75}A width, as a percentage of the normal one: the face registered for it, or a variable font's wdth. A missing width 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, so a larger run on the line makes it taller. 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'].
[font-variation-settings:…]fontVariationSettings[font-variation-settings:'wdth'_75] → {"fontVariationSettings":{"wdth":75}}Axis values of a variable font, as an arbitrary property with _ for spaces: [font-variation-settings:'wdth'_75]. A wght in it wins over the weight.
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-balance, text-nowraptextWrap, whiteSpacetext-wrap → {"textWrap":"wrap"}text-pretty breaks lines over the whole paragraph for even lines (textWrap: pretty); text-balance makes the lines of a heading about as long as each other (textWrap: balance); 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.

Page variants

UtilitiesEngine propertyExample → resultNotes
sm: … 2xl:, max-sm: … max-2xl:, min-[…]:, max-[…]:, portrait:, landscape:, print:, [@media(…)]:the class, on pages it matchesmd:p-4 → {"paddingTop":12,"paddingRight":12,"paddingBottom":12,"paddingLeft":12}Media queries read the page: its width and height (the whole sheet, margins included), aspect-ratio and orientation; print always matches. Breakpoints are Tailwind's: sm 480pt, md 576pt (A4 and Letter portrait are wider), lg 768pt (their landscape is wider), xl 960pt, 2xl 1152pt; a theme can add its own (--breakpoint-a4: 49.6067rem, 595.28pt, gives a4: and max-a4:; write them all in rem, as Tailwind sorts breakpoints of different units by unit, not by size). Variants stack (sm:landscape:).

Not supported

ExampleWhy
hover:p-4Variants of interaction and state (hover:, focus:, first:, group-*:): a PDF has no states.
dark:bg-blackMedia features of screens (dark:, motion-safe:, contrast-more:): a page has width, height and orientation only.
@sm:p-4Container queries (@sm:, @container).
containercontainer: it follows the screen width; use max-w-* or w-full.
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.
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.