Tailwind CSS Cheat Sheet Complete Utility Class Reference

The ultimate Tailwind CSS cheat sheet for 2026. Every utility class organized by category with CSS equivalents and practical descriptions. Bookmark this page for instant reference while building with Tailwind CSS.

📐 Layout

ClassCSSDescription
flexdisplay: flexFlex container
griddisplay: gridGrid container
blockdisplay: blockBlock element
inline-flexdisplay: inline-flexInline flex
hiddendisplay: noneHide element
relativeposition: relativeRelative position
absoluteposition: absoluteAbsolute position
fixedposition: fixedFixed position
stickyposition: stickySticky position
containermax-width responsiveResponsive container

↔️ Flexbox

ClassCSSDescription
flex-rowflex-direction: rowHorizontal direction
flex-colflex-direction: columnVertical direction
justify-centerjustify-content: centerCenter main axis
justify-betweenjustify-content: space-betweenSpace between items
items-centeralign-items: centerCenter cross axis
items-startalign-items: flex-startAlign to start
flex-wrapflex-wrap: wrapAllow wrapping
gap-4gap: 1rem16px gap between items
flex-1flex: 1 1 0%Grow and shrink equally
flex-noneflex: noneNo grow or shrink

📏 Spacing

ClassCSSDescription
p-4padding: 1rem16px all sides
px-6padding-left/right: 1.5rem24px horizontal
py-3padding-top/bottom: 0.75rem12px vertical
pt-8padding-top: 2rem32px top
m-4margin: 1rem16px margin all sides
mx-automargin-left/right: autoCenter horizontally
mt-6margin-top: 1.5rem24px top margin
mb-4margin-bottom: 1rem16px bottom margin
space-x-4margin-left: 1rem (children)Horizontal child spacing
space-y-2margin-top: 0.5rem (children)Vertical child spacing

🔤 Typography

ClassCSSDescription
text-smfont-size: 0.875remSmall text
text-basefont-size: 1remBase text
text-lgfont-size: 1.125remLarge text
text-xlfont-size: 1.25remExtra large
text-2xlfont-size: 1.5rem2x large
text-3xlfont-size: 1.875rem3x large
font-boldfont-weight: 700Bold text
font-semiboldfont-weight: 600Semi-bold text
font-mediumfont-weight: 500Medium weight
leading-relaxedline-height: 1.625Relaxed line height
text-centertext-align: centerCenter text
uppercasetext-transform: uppercaseUppercase text
tracking-wideletter-spacing: 0.025emWide letter spacing

🎨 Colors

ClassCSSDescription
text-whitecolor: #fffWhite text
text-gray-500color: #6b7280Medium gray text
text-blue-500color: #3b82f6Blue text
bg-whitebackground-color: #fffWhite background
bg-gray-100background-color: #f3f4f6Light gray bg
bg-blue-500background-color: #3b82f6Blue background
border-gray-200border-color: #e5e7ebGray border
bg-gradient-to-rbackground: linear-gradient(to right)Gradient right

📐 Sizing

ClassCSSDescription
w-fullwidth: 100%Full width
w-1/2width: 50%Half width
w-screenwidth: 100vwScreen width
h-screenheight: 100vhScreen height
min-h-screenmin-height: 100vhMin screen height
max-w-lgmax-width: 32remMax width large
max-w-7xlmax-width: 80remMax width 7xl
size-10width/height: 2.5rem40px square

🔲 Borders & Shadows

ClassCSSDescription
borderborder-width: 1pxDefault border
border-2border-width: 2px2px border
roundedborder-radius: 0.25remSmall radius
rounded-lgborder-radius: 0.5remLarge radius
rounded-fullborder-radius: 9999pxCircle/pill
shadow-smbox-shadow: smallSmall shadow
shadow-mdbox-shadow: mediumMedium shadow
shadow-lgbox-shadow: largeLarge shadow
shadow-xlbox-shadow: extra largeXL shadow

Effects & Transitions

ClassCSSDescription
opacity-50opacity: 0.550% opacity
transitiontransition-property: allAll transitions
transition-colorstransition: color, bg, borderColor transitions
duration-300transition-duration: 300ms300ms duration
hover:bg-blue-600on hover: backgroundHover background
focus:ring-2on focus: ringFocus ring
transformtransform: enabledEnable transforms
scale-105scale(1.05)105% scale

📱 Responsive Breakpoints

Tailwind CSS uses mobile-first responsive prefixes. Add these prefixes before any utility class to apply it at a specific breakpoint and above.

PrefixMin WidthCSSExample
sm:640px@media (min-width: 640px)sm:flex
md:768px@media (min-width: 768px)md:grid-cols-2
lg:1024px@media (min-width: 1024px)lg:text-xl
xl:1280px@media (min-width: 1280px)xl:grid-cols-4
2xl:1536px@media (min-width: 1536px)2xl:max-w-8xl

Frequently Asked Questions

A Tailwind CSS cheat sheet is a quick reference guide that organizes all Tailwind CSS utility classes by category for fast lookup. Instead of searching documentation, developers use cheat sheets to quickly find the correct class name for spacing, typography, colors, layout, and other CSS properties.
Tailwind CSS v4 generates thousands of utility classes covering every CSS property. The core framework includes classes for spacing (padding, margin), typography (font size, weight, line height), colors (text, background, border), layout (flex, grid, position), sizing (width, height), borders, shadows, transitions, and responsive variants.
Tailwind CSS uses a consistent spacing scale where each unit equals 4px (0.25rem). Common values: p-1 (4px), p-2 (8px), p-4 (16px), p-6 (24px), p-8 (32px), p-12 (48px), p-16 (64px). The same scale applies to margin (m-), gap (gap-), width (w-), and height (h-) utilities.
Tailwind CSS uses mobile-first responsive prefixes: sm: (640px+), md: (768px+), lg: (1024px+), xl: (1280px+), and 2xl: (1536px+). Apply any utility at a specific breakpoint by adding the prefix. Example: md:flex-row makes an element flex-row on medium screens and above while remaining the default on smaller screens.
Tailwind CSS uses a color-shade naming pattern: {color}-{shade}. Colors include slate, gray, zinc, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, and rose. Shades range from 50 (lightest) to 950 (darkest) in increments of 50 and 100.