Extended, grouped reference for Tailwind CSS v4 utility classes — compiled from the official docs so it actually reflects v4, not v3. Need something you can keep on your desk? Try the condensed version.
The most common source of outdated cheatsheets: these utilities were renamed or changed behavior in v4.
| v3 | v4 | Note |
|---|---|---|
| shadow-sm | shadow-xs | |
| shadow | shadow-sm | |
| drop-shadow-sm | drop-shadow-xs | |
| drop-shadow | drop-shadow-sm | |
| blur-sm | blur-xs | |
| blur | blur-sm | |
| backdrop-blur-sm | backdrop-blur-xs | |
| backdrop-blur | backdrop-blur-sm | |
| rounded-sm | rounded-xs | |
| rounded | rounded-sm | |
| outline-none | outline-hidden | |
| ring | ring-3 | default ring width is now 1px, not 3px |
| flex-shrink-* | shrink-* | |
| flex-grow-* | grow-* | |
| overflow-ellipsis | text-ellipsis | |
| decoration-slice | box-decoration-slice | |
| decoration-clone | box-decoration-clone | |
| bg-opacity-* | bg-black/50 | opacity modifiers replace all *-opacity-* utilities |
| text-opacity-* | text-black/50 | |
| border-opacity-* | border-black/50 | |
| ring-opacity-* | ring-black/50 | |
| !flex | flex! | important modifier moved to the end of the class |
| bg-[--brand] | bg-(--brand) | arbitrary CSS variable syntax |
| grid-cols-[max-content,auto] | grid-cols-[max-content_auto] | commas in arbitrary values become underscores |
containerFixed max-width at each breakpointblock / inline-block / inlinedisplayflex / inline-flexdisplay: flexgrid / inline-griddisplay: gridhiddendisplay: noneaspect-square / aspect-video / aspect-[4/3]aspect-ratiocolumns-2 ... columns-12column-countbreak-after-column / break-before-page / break-inside-avoidCSS fragmentation breaksbox-border / box-contentbox-sizingfloat-left / float-right / float-nonefloatclear-left / clear-right / clear-bothclearisolate / isolation-autoisolation (stacking context)object-cover / object-contain / object-fill / object-noneobject-fitobject-center / object-top / object-left-bottomobject-positionoverflow-auto / overflow-hidden / overflow-scroll / overflow-visibleoverflow (also overflow-x-*, overflow-y-*)overscroll-auto / overscroll-contain / overscroll-noneoverscroll-behaviorstatic / fixed / absolute / relative / stickypositioninset-0 / top-4 / right-2 / bottom-0 / left-1/2top / right / bottom / leftvisible / invisible / collapsevisibilityz-0 ... z-50 / z-auto / -z-10z-indexflex-row / flex-row-reverse / flex-col / flex-col-reverseflex-directionflex-wrap / flex-wrap-reverse / flex-nowrapflex-wrapflex-1 / flex-auto / flex-initial / flex-noneflex shorthandgrow / grow-0flex-grow (was flex-grow-* in v3)shrink / shrink-0flex-shrink (was flex-shrink-* in v3)basis-0 / basis-1/2 / basis-full / basis-64flex-basisorder-1 ... order-12 / order-first / order-last / -order-1ordergrid-cols-1 ... grid-cols-12 / grid-cols-nonegrid-template-columnscol-span-2 / col-start-3 / col-end-5 / col-autogrid-column placementgrid-rows-1 ... grid-rows-6grid-template-rowsrow-span-2 / row-start-1 / row-end-3grid-row placementgrid-flow-row / grid-flow-col / grid-flow-densegrid-auto-flowauto-cols-auto / auto-cols-min / auto-cols-frgrid-auto-columnsauto-rows-auto / auto-rows-min / auto-rows-frgrid-auto-rowsgap-4 / gap-x-2 / gap-y-6gap between flex/grid itemsjustify-start / justify-center / justify-between / justify-evenlyjustify-contentjustify-items-start / justify-items-center / justify-items-stretchjustify-itemsjustify-self-auto / justify-self-endjustify-selfcontent-center / content-between / content-stretchalign-contentitems-start / items-center / items-baseline / items-stretchalign-itemsself-auto / self-center / self-stretchalign-selfplace-content-center / place-items-center / place-self-centerplace-* shorthandsp-4 / px-4 / py-4 / pt-4 / pr-4 / pb-4 / pl-4padding (all sides / axis / single side)ps-4 / pe-4padding-inline-start / padding-inline-end (logical)m-4 / mx-auto / my-4 / mt-4 / -mt-4margin (negative values allowed with -)ms-4 / me-4margin-inline-start / margin-inline-end (logical)space-x-4 / space-y-4gap between direct children (adds margin between siblings)space-x-reversereverses the direction spacing is applied0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96default spacing scale (1 unit = 0.25rem = 4px, so p-4 = 1rem)w-4 / w-1/2 / w-full / w-screen / w-fit / w-min / w-maxwidthmin-w-0 / min-w-full / min-w-fitmin-widthmax-w-xs ... max-w-7xl / max-w-full / max-w-prose / max-w-nonemax-widthh-4 / h-1/2 / h-full / h-screen / h-dvh / h-svh / h-lvhheight (dvh/svh/lvh = dynamic/small/large viewport units)min-h-0 / min-h-screen / min-h-fullmin-heightmax-h-full / max-h-screenmax-heightsize-4 / size-full / size-1/2sets width and height togetherfont-sans / font-serif / font-monofont-familytext-xs ... text-9xlfont-size (each step sets a matching line-height)antialiased / subpixel-antialiasedfont-smoothingitalic / not-italicfont-stylefont-thin ... font-blackfont-weight (100-900)tracking-tighter ... tracking-widestletter-spacingleading-none ... leading-loose / leading-4 ... leading-10line-heightline-clamp-1 ... line-clamp-6 / line-clamp-nonetruncate text to N lineslist-none / list-disc / list-decimallist-style-typelist-inside / list-outsidelist-style-positiontext-left / text-center / text-right / text-justifytext-aligntext-red-500 / text-black/50text color (with opacity modifier)underline / overline / line-through / no-underlinetext-decoration-linedecoration-red-500 / decoration-2 / decoration-wavytext-decoration color / thickness / styleunderline-offset-4text-underline-offsetuppercase / lowercase / capitalize / normal-casetext-transformtruncate / text-ellipsis / text-cliptext-overflowtext-wrap / text-nowrap / text-balance / text-prettytext-wrapindent-4 / -indent-4text-indentalign-baseline / align-top / align-middle / align-bottomvertical-alignwhitespace-normal / whitespace-nowrap / whitespace-pre-wrapwhite-spacebreak-normal / break-words / break-all / break-keepword-break / overflow-wraphyphens-none / hyphens-manual / hyphens-autohyphenscontent-none / content-['*']content (for ::before / ::after)text-shadow-2xs ... text-shadow-lg / text-shadow-nonetext-shadow (new utility in v4)bg-fixed / bg-local / bg-scrollbackground-attachmentbg-clip-border / bg-clip-padding / bg-clip-content / bg-clip-textbackground-clipbg-red-500 / bg-transparent / bg-black/25background-color (with opacity modifier)bg-none / bg-linear-to-r / bg-radial / bg-conicbackground-image / gradientsfrom-cyan-500 via-blue-500 to-indigo-500gradient color stopsbg-origin-border / bg-origin-padding / bg-origin-contentbackground-originbg-center / bg-top / bg-[center_top_1rem]background-positionbg-repeat / bg-no-repeat / bg-repeat-x / bg-repeat-ybackground-repeatbg-auto / bg-cover / bg-containbackground-sizerounded-xs ... rounded-3xl / rounded-fullborder-radius (v4: rounded-sm→rounded-xs, rounded→rounded-sm)rounded-t-lg / rounded-tl-lgborder-radius per side / cornerborder / border-2 / border-t / border-x-4border-width (default border color is currentColor in v4)border-red-500 / border-black/50border-colorborder-solid / border-dashed / border-dotted / border-noneborder-styledivide-x / divide-y / divide-red-500border between childrenoutline / outline-2 / outline-offset-2outline-width / outline-offsetoutline-red-500outline-coloroutline-hidden / outline-none / outline-dashedoutline-style (v4: outline-none→outline-hidden keeps focus ring for a11y)shadow-xs ... shadow-2xl / shadow-nonebox-shadow (v4: shadow-sm→shadow-xs, shadow→shadow-sm)shadow-red-500/50colored box-shadowopacity-0 ... opacity-100opacitymix-blend-multiply / mix-blend-screen / mix-blend-overlaymix-blend-modebg-blend-multiply / bg-blend-overlaybackground-blend-modemask-clip-border / mask-origin-paddingmask-clip / mask-originmask-linear-to-r / mask-radial / mask-[<url>]mask-image utilitiesblur-xs ... blur-3xl / blur-nonefilter: blur (v4: blur-sm→blur-xs, blur→blur-sm)brightness-50 ... brightness-200filter: brightnesscontrast-50 ... contrast-200filter: contrastdrop-shadow-xs ... drop-shadow-2xlfilter: drop-shadow (v4 renamed, see blur)grayscale / grayscale-0filter: grayscalehue-rotate-90 / -hue-rotate-90filter: hue-rotateinvert / invert-0filter: invertsaturate-50 ... saturate-200filter: saturatesepia / sepia-0filter: sepiabackdrop-blur-xs ... backdrop-blur-3xlbackdrop-filter: blur (v4 renamed, see blur)backdrop-brightness-50 / backdrop-contrast-125 / backdrop-opacity-50other backdrop-filter utilitiesborder-collapse / border-separateborder-collapseborder-spacing-2 / border-spacing-x-2border-spacingtable-auto / table-fixedtable-layoutcaption-top / caption-bottomcaption-sidetransition / transition-all / transition-colors / transition-nonetransition-propertyduration-75 ... duration-1000transition-durationease-linear / ease-in / ease-out / ease-in-outtransition-timing-functiondelay-75 ... delay-1000transition-delayanimate-spin / animate-ping / animate-pulse / animate-bounce / animate-noneanimation presetsscale-0 ... scale-150 / scale-x-50 / scale-y-50scalerotate-0 ... rotate-180 / -rotate-45rotatetranslate-x-4 / -translate-y-1/2translateskew-x-6 / skew-y-3skeworigin-center / origin-top-lefttransform-origintransform-none / transform-gpuforce / disable hardware accelerationperspective-dramatic / perspective-noneperspectivebackface-visible / backface-hiddenbackface-visibilityaccent-red-500accent-color (checkboxes, radios, range inputs)appearance-none / appearance-autoappearancecaret-red-500caret-colorcursor-pointer / cursor-not-allowed / cursor-wait / cursor-grabcursorfield-sizing-content / field-sizing-fixedfield-sizing (auto-growing textareas)pointer-events-none / pointer-events-autopointer-eventsresize / resize-none / resize-x / resize-yresizescroll-auto / scroll-smoothscroll-behaviorscroll-m-4 / scroll-p-4scroll-margin / scroll-paddingsnap-start / snap-center / snap-x / snap-mandatoryscroll-snap utilitiestouch-auto / touch-none / touch-pan-xtouch-actionselect-none / select-text / select-all / select-autouser-selectwill-change-auto / will-change-scroll / will-change-transformwill-changefill-red-500 / fill-current / fill-nonefillstroke-red-500 / stroke-currentstrokestroke-0 / stroke-1 / stroke-2stroke-widthsr-only / not-sr-onlyvisually hide while keeping content for screen readersforced-color-adjust-auto / forced-color-adjust-noneforced-color-adjust (Windows High Contrast Mode)sm: (≥40rem / 640px)small screens and upmd: (≥48rem / 768px)medium screens and uplg: (≥64rem / 1024px)large screens and upxl: (≥80rem / 1280px)extra-large screens and up2xl: (≥96rem / 1536px)2x extra-large screens and upmax-sm: / max-md: / max-lg: / max-xl: / max-2xl:applies below that breakpoint (stack with a lower prefix for a range, e.g. md:max-lg:)min-[475px]: / max-[600px]:arbitrary breakpoint values@container / @container/namemark an element as a query container (optionally named)@xs ... @7xl:style based on container width instead of viewport (@sm:flex-row)@max-sm: / @min-[475px]:max-width / arbitrary container query variants@sm/name: / @max-md/name:target a specific named ancestor containerhover: / focus: / active: / visited:interaction statesfocus-within: / focus-visible:focus states for parent / keyboard-only focusdisabled: / required: / invalid: / checked:form statesfirst: / last: / odd: / even: / only:structural pseudo-classesgroup-hover: / group-focus:style based on a parent with the group classpeer-checked: / peer-focus:style based on a sibling with the peer classhas-[:checked]: / has-checked::has() — style based on a descendant's statenot-hover: / not-disabled::not() — style when a state does NOT applydark:dark mode (based on prefers-color-scheme or a class strategy)before: / after: / placeholder: / selection: / file:pseudo-elementsstarting:@starting-style — enter/exit transitions without JSimatlas.dev — made with <3