Tailwind Cheat Sheet
Search every Tailwind utility by name or meaning, browse by category, copy the class and see a usage example — with responsive and state prefixes explained.
126 classes shown
Layout
blockDisplay as a block element
inline-blockInline but respects width and height
flexLay children out with flexbox
gridLay children out with CSS grid
hiddenRemove from layout entirely
relativePosition relative to itself, enabling absolute children
absolutePosition against the nearest positioned ancestor
fixedPosition against the viewport
stickyStay in place while its container scrolls
Example: sticky top-0 z-10
inset-0Pin to all four edges — the full-cover overlay
top-0 / bottom-0 / left-0 / right-0Pin to one edge
z-10 / z-50Stacking order above siblings
containerCenter content with responsive max width
columns-2Flow text into two CSS columns
aspect-videoHold a 16:9 box as it resizes
overflow-hiddenClip anything that escapes the box
overflow-autoScroll inside the box only when needed
Flexbox & Grid
flex-row / flex-colMain axis: horizontal or vertical
flex-wrapLet children wrap onto new lines
flex-1Grow to fill the remaining space
flex-noneNever grow or shrink
items-centerAlign children on the cross axis
items-start / items-endAlign children to the cross-axis start or end
justify-centerCenter children on the main axis
justify-betweenPush children to both ends
justify-endPush children to the main-axis end
gap-4Space between children — works in flex and grid
grid-cols-3Three equal columns
col-span-2Let an item cover two columns
grid-rows-2Two explicit rows
place-items-centerCenter grid items on both axes
space-y-3Vertical rhythm between stacked children
order-1 / order-lastReorder children without touching the markup
Spacing
p-4Padding on all sides (1rem)
px-6 / py-3Horizontal or vertical padding only
pt-2 / pb-8 / pl-1 / pr-0Padding on one edge
m-0Margin on all sides
mx-autoCentre a fixed-width block horizontally
mt-4 / mb-2Margin on one edge
-mt-2Negative margin pulls toward the neighbour
gap-x-4 / gap-y-2Separate horizontal and vertical gaps
space-x-2Horizontal rhythm between inline children
Sizing
w-fullFull width of the parent
w-1/2Half width
w-screenViewport width
w-fit / w-maxShrink-wrap to content
h-screenViewport height
min-h-screenAt least a full viewport tall
max-w-mdCap the width at 28rem
max-w-proseComfortable reading measure (~65ch)
size-10Width and height together (Tailwind 3.4+)
w-[320px]Arbitrary value when no scale step fits
Typography
text-sm / text-lgFont size with matching line height
font-boldFont weight
italicItalic text
uppercase / lowercase / capitalizeLetter case transform
tracking-wideLetter spacing
leading-relaxedLine height
text-center / text-left / text-rightHorizontal alignment
truncateOne line, clipped with an ellipsis
line-clamp-3Clamp to three lines with an ellipsis
break-wordsBreak long words instead of overflowing
font-mono / font-sans / font-serifFont family
text-balanceBalance headline line lengths (3.4+)
proseTypography plugin styling for rich HTML
Backgrounds
bg-slate-900Background colour from the palette
bg-[#0A0A0A]Arbitrary background colour
bg-transparentNo fill
bg-gradient-to-rLinear gradient to the right
Example: bg-gradient-to-r from-lime-300 to-emerald-500
bg-cover / bg-containHow a background image fills the box
bg-centerBackground image position
bg-no-repeatDraw the background image once
Borders
border1px border in the default colour
border-2Thicker border
border-tTop edge only
border-slate-200Border colour
rounded-lgCorner radius
rounded-fullPill / circle
divide-yBorders between stacked children
ring-2 / ring-offset-2Outline ring, handy for focus states
outline-noneRemove the default focus outline (pair it with a ring)
Effects
shadow-sm / shadow-lgBox shadow
shadow-noneRemove the shadow
opacity-60Element transparency
mix-blend-multiplyBlend mode with the backdrop
backdrop-blur-mdBlur whatever sits behind the element
blur-smBlur the element itself
Filters
grayscaleRemove colour
invertInvert colours
sepiaSepia tone
brightness-110Brighten
contrast-125Increase contrast
saturate-150Increase saturation
drop-shadow-lgShadow that follows the shape's alpha
Transitions
transitionAnimate common properties on change
transition-colorsAnimate colour changes only
duration-200Transition length in milliseconds
ease-in-outTiming curve
delay-100Wait before the transition starts
animate-spinContinuous spin
animate-pulseFade pulse
animate-bounceBounce
Transforms
scale-105Scale up on both axes
rotate-45Rotate
translate-x-2Shift along an axis
origin-top-leftSet the transform origin
transform-gpuForce GPU compositing
Interactivity
cursor-pointerHand cursor
select-nonePrevent text selection
pointer-events-noneLet clicks pass through
resize-yNative resize handle
scroll-smoothAnimate scrolls inside the element
sr-onlyVisually hidden, still read by screen readers
accent-lime-400Colour of native checkboxes and ranges
Responsive & State
sm: / md: / lg: / xl: / 2xl:Apply from that breakpoint upward
Example: md:grid-cols-2
max-md:Apply only below a breakpoint
Example: max-md:hidden
hover:While the pointer is over the element
Example: hover:bg-slate-800
focus: / focus-visible:On keyboard or input focus
Example: focus-visible:ring-2
active:While pressed
disabled:When the control is disabled
group / group-hover:Style children from a parent's state
Example: group-hover:opacity-100
peer / peer-checked:Style a sibling from an input's state
dark:When dark mode is active
Example: dark:bg-slate-950
motion-reduce:Respect the reduced-motion preference
aria-expanded:Style from an ARIA state
*:Target direct children (3.4+)
Spacing scale
| Class | rem | px |
|---|---|---|
p-0 | 0rem | 0 |
p-0.5 | 0.125rem | 2 |
p-1 | 0.25rem | 4 |
p-2 | 0.5rem | 8 |
p-3 | 0.75rem | 12 |
p-4 | 1rem | 16 |
p-6 | 1.5rem | 24 |
p-8 | 2rem | 32 |
p-12 | 3rem | 48 |
p-16 | 4rem | 64 |
p-24 | 6rem | 96 |
One step is 0.25rem (4px) — spacing utilities share this scale, so p-4 is 1rem.
How to use the Tailwind cheat sheet
- 1Search for a class name or what you want to do.
- 2Narrow the list with the category chips.
- 3Copy any class with one click.
- 4Need a custom scale? Continue in the Tailwind Shade Generator.
About this tool
Every entry is a utility from the default Tailwind v3 scale, grouped by what it does: layout, flexbox and grid, spacing, sizing, typography, backgrounds, borders, effects, filters, transitions, transforms, interactivity, and the responsive/state prefixes. Responsive variants apply from a breakpoint upward (md:), while max-md: applies only below it — the pair that trips people up most often.
FAQ
Is this tool free?
Yes — every tool is free, with no signup and no subscription.
Are my files uploaded?
No. Everything is processed in your browser and nothing is stored.
Does it work on a phone?
Yes. The layout adapts to small screens and every result downloads normally.
Advertisement space — reserved