Tailwind CSS Reference & Cheat Sheet
Search and browse Tailwind CSS utility classes by category, see the CSS behind each one with a live preview, and copy class names.
Tailwind CSS Reference & Cheat Sheet
430 utilities shown
Layout
containerContainer with responsive max-widths
width: 100%; max-width: ...box-borderbox-sizing: border-box;box-contentbox-sizing: content-box;blockdisplay: block;inline-blockdisplay: inline-block;inlinedisplay: inline;flexdisplay: flex;inline-flexdisplay: inline-flex;griddisplay: grid;inline-griddisplay: inline-grid;hiddendisplay: none;float-leftfloat: left;float-rightfloat: right;float-nonefloat: none;clear-leftclear: left;clear-rightclear: right;clear-bothclear: both;clear-noneclear: none;object-containobject-fit: contain;object-coverobject-fit: cover;object-fillobject-fit: fill;object-noneobject-fit: none;object-scale-downobject-fit: scale-down;overflow-autooverflow: auto;overflow-hiddenoverflow: hidden;overflow-visibleoverflow: visible;overflow-scrolloverflow: scroll;overflow-x-autooverflow-x: auto;overflow-y-autooverflow-y: auto;staticposition: static;fixedposition: fixed;absoluteposition: absolute;relativeposition: relative;stickyposition: sticky;visiblevisibility: visible;invisiblevisibility: hidden;z-0z-index: 0;z-10z-index: 10;z-20z-index: 20;z-30z-index: 30;z-40z-index: 40;z-50z-index: 50;z-autoz-index: auto;Flexbox
flex-rowflex-direction: row;flex-row-reverseflex-direction: row-reverse;flex-colflex-direction: column;flex-col-reverseflex-direction: column-reverse;flex-wrapflex-wrap: wrap;flex-wrap-reverseflex-wrap: wrap-reverse;flex-nowrapflex-wrap: nowrap;flex-1flex: 1 1 0%;flex-autoflex: 1 1 auto;flex-initialflex: 0 1 auto;flex-noneflex: none;growflex-grow: 1;grow-0flex-grow: 0;shrinkflex-shrink: 1;shrink-0flex-shrink: 0;justify-startjustify-content: flex-start;justify-endjustify-content: flex-end;justify-centerjustify-content: center;justify-betweenjustify-content: space-between;justify-aroundjustify-content: space-around;justify-evenlyjustify-content: space-evenly;items-startalign-items: flex-start;items-endalign-items: flex-end;items-centeralign-items: center;items-baselinealign-items: baseline;items-stretchalign-items: stretch;content-startalign-content: flex-start;content-endalign-content: flex-end;content-centeralign-content: center;content-betweenalign-content: space-between;content-aroundalign-content: space-around;content-evenlyalign-content: space-evenly;self-autoalign-self: auto;self-startalign-self: flex-start;self-endalign-self: flex-end;self-centeralign-self: center;self-stretchalign-self: stretch;gap-0gap: 0px;gap-1gap: 0.25rem;gap-2gap: 0.5rem;gap-4gap: 1rem;gap-8gap: 2rem;Grid
grid-cols-1grid-template-columns: repeat(1, minmax(0, 1fr));grid-cols-2grid-template-columns: repeat(2, minmax(0, 1fr));grid-cols-3grid-template-columns: repeat(3, minmax(0, 1fr));grid-cols-4grid-template-columns: repeat(4, minmax(0, 1fr));grid-cols-6grid-template-columns: repeat(6, minmax(0, 1fr));grid-cols-12grid-template-columns: repeat(12, minmax(0, 1fr));grid-rows-1grid-template-rows: repeat(1, minmax(0, 1fr));grid-rows-2grid-template-rows: repeat(2, minmax(0, 1fr));grid-rows-3grid-template-rows: repeat(3, minmax(0, 1fr));col-span-1grid-column: span 1 / span 1;col-span-2grid-column: span 2 / span 2;col-span-3grid-column: span 3 / span 3;col-span-4grid-column: span 4 / span 4;col-span-fullgrid-column: 1 / -1;row-span-1grid-row: span 1 / span 1;row-span-2grid-row: span 2 / span 2;row-span-3grid-row: span 3 / span 3;auto-cols-autogrid-auto-columns: auto;auto-cols-mingrid-auto-columns: min-content;auto-cols-maxgrid-auto-columns: max-content;auto-cols-frgrid-auto-columns: minmax(0, 1fr);auto-rows-autogrid-auto-rows: auto;auto-rows-mingrid-auto-rows: min-content;auto-rows-maxgrid-auto-rows: max-content;auto-rows-frgrid-auto-rows: minmax(0, 1fr);grid-flow-rowgrid-auto-flow: row;grid-flow-colgrid-auto-flow: column;grid-flow-densegrid-auto-flow: dense;place-content-centerplace-content: center;place-items-centerplace-items: center;place-self-centerplace-self: center;Spacing
p-0padding: 0px;p-1padding: 0.25rem;p-2padding: 0.5rem;p-3padding: 0.75rem;p-4padding: 1rem;p-5padding: 1.25rem;p-6padding: 1.5rem;p-8padding: 2rem;p-10padding: 2.5rem;p-12padding: 3rem;px-0padding-left: 0px; padding-right: 0px;px-1padding-left: 0.25rem; padding-right: 0.25rem;px-2padding-left: 0.5rem; padding-right: 0.5rem;px-4padding-left: 1rem; padding-right: 1rem;px-6padding-left: 1.5rem; padding-right: 1.5rem;py-0padding-top: 0px; padding-bottom: 0px;py-1padding-top: 0.25rem; padding-bottom: 0.25rem;py-2padding-top: 0.5rem; padding-bottom: 0.5rem;py-4padding-top: 1rem; padding-bottom: 1rem;py-8padding-top: 2rem; padding-bottom: 2rem;pt-0padding-top: 0px;pt-4padding-top: 1rem;pr-4padding-right: 1rem;pb-4padding-bottom: 1rem;pl-4padding-left: 1rem;m-0margin: 0px;m-1margin: 0.25rem;m-2margin: 0.5rem;m-4margin: 1rem;m-8margin: 2rem;m-automargin: auto;mx-0margin-left: 0px; margin-right: 0px;mx-1margin-left: 0.25rem; margin-right: 0.25rem;mx-2margin-left: 0.5rem; margin-right: 0.5rem;mx-4margin-left: 1rem; margin-right: 1rem;mx-automargin-left: auto; margin-right: auto;my-0margin-top: 0px; margin-bottom: 0px;my-2margin-top: 0.5rem; margin-bottom: 0.5rem;my-4margin-top: 1rem; margin-bottom: 1rem;mt-0margin-top: 0px;mt-4margin-top: 1rem;mr-4margin-right: 1rem;mb-4margin-bottom: 1rem;ml-4margin-left: 1rem;-m-1margin: -0.25rem;-m-2margin: -0.5rem;space-x-1Horizontal spacing between children
& > * + * { margin-left: 0.25rem; }space-x-2Horizontal spacing between children
& > * + * { margin-left: 0.5rem; }space-x-4Horizontal spacing between children
& > * + * { margin-left: 1rem; }space-y-1Vertical spacing between children
& > * + * { margin-top: 0.25rem; }space-y-2Vertical spacing between children
& > * + * { margin-top: 0.5rem; }space-y-4Vertical spacing between children
& > * + * { margin-top: 1rem; }Sizing
w-0width: 0px;w-1width: 0.25rem;w-2width: 0.5rem;w-4width: 1rem;w-8width: 2rem;w-12width: 3rem;w-16width: 4rem;w-24width: 6rem;w-32width: 8rem;w-48width: 12rem;w-64width: 16rem;w-autowidth: auto;w-1/2width: 50%;w-1/3width: 33.333333%;w-2/3width: 66.666667%;w-1/4width: 25%;w-3/4width: 75%;w-fullwidth: 100%;w-screenwidth: 100vw;w-minwidth: min-content;w-maxwidth: max-content;w-fitwidth: fit-content;h-0height: 0px;h-1height: 0.25rem;h-2height: 0.5rem;h-4height: 1rem;h-8height: 2rem;h-12height: 3rem;h-16height: 4rem;h-24height: 6rem;h-32height: 8rem;h-48height: 12rem;h-64height: 16rem;h-autoheight: auto;h-fullheight: 100%;h-screenheight: 100vh;min-w-0min-width: 0px;min-w-fullmin-width: 100%;max-w-xsmax-width: 20rem;max-w-smmax-width: 24rem;max-w-mdmax-width: 28rem;max-w-lgmax-width: 32rem;max-w-xlmax-width: 36rem;max-w-2xlmax-width: 42rem;max-w-fullmax-width: 100%;min-h-0min-height: 0px;min-h-fullmin-height: 100%;min-h-screenmin-height: 100vh;max-h-fullmax-height: 100%;max-h-screenmax-height: 100vh;Typography
text-xsfont-size: 0.75rem; line-height: 1rem;text-smfont-size: 0.875rem; line-height: 1.25rem;text-basefont-size: 1rem; line-height: 1.5rem;text-lgfont-size: 1.125rem; line-height: 1.75rem;text-xlfont-size: 1.25rem; line-height: 1.75rem;text-2xlfont-size: 1.5rem; line-height: 2rem;text-3xlfont-size: 1.875rem; line-height: 2.25rem;text-4xlfont-size: 2.25rem; line-height: 2.5rem;text-5xlfont-size: 3rem; line-height: 1;text-6xlfont-size: 3.75rem; line-height: 1;font-thinfont-weight: 100;font-extralightfont-weight: 200;font-lightfont-weight: 300;font-normalfont-weight: 400;font-mediumfont-weight: 500;font-semiboldfont-weight: 600;font-boldfont-weight: 700;font-extraboldfont-weight: 800;font-blackfont-weight: 900;italicfont-style: italic;not-italicfont-style: normal;uppercasetext-transform: uppercase;lowercasetext-transform: lowercase;capitalizetext-transform: capitalize;normal-casetext-transform: none;underlinetext-decoration-line: underline;line-throughtext-decoration-line: line-through;no-underlinetext-decoration-line: none;text-lefttext-align: left;text-centertext-align: center;text-righttext-align: right;text-justifytext-align: justify;leading-noneline-height: 1;leading-tightline-height: 1.25;leading-snugline-height: 1.375;leading-normalline-height: 1.5;leading-relaxedline-height: 1.625;leading-looseline-height: 2;tracking-tighterletter-spacing: -0.05em;tracking-tightletter-spacing: -0.025em;tracking-normalletter-spacing: 0em;tracking-wideletter-spacing: 0.025em;tracking-widerletter-spacing: 0.05em;tracking-widestletter-spacing: 0.1em;break-normaloverflow-wrap: normal; word-break: normal;break-wordsoverflow-wrap: break-word;break-allword-break: break-all;truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrap;Colors
text-blackcolor: rgb(0 0 0);text-whitecolor: rgb(255 255 255);text-gray-50color: rgb(249 250 251);text-gray-100color: rgb(243 244 246);text-gray-200color: rgb(229 231 235);text-gray-300color: rgb(209 213 219);text-gray-400color: rgb(156 163 175);text-gray-500color: rgb(107 114 128);text-gray-600color: rgb(75 85 99);text-gray-700color: rgb(55 65 81);text-gray-800color: rgb(31 41 55);text-gray-900color: rgb(17 24 39);text-red-500color: rgb(239 68 68);text-red-600color: rgb(220 38 38);text-orange-500color: rgb(249 115 22);text-yellow-500color: rgb(234 179 8);text-green-500color: rgb(34 197 94);text-green-600color: rgb(22 163 74);text-blue-500color: rgb(59 130 246);text-blue-600color: rgb(37 99 235);text-indigo-500color: rgb(99 102 241);text-purple-500color: rgb(168 85 247);text-pink-500color: rgb(236 72 153);Backgrounds
bg-transparentbackground-color: transparent;bg-blackbackground-color: rgb(0 0 0);bg-whitebackground-color: rgb(255 255 255);bg-gray-50background-color: rgb(249 250 251);bg-gray-100background-color: rgb(243 244 246);bg-gray-200background-color: rgb(229 231 235);bg-gray-300background-color: rgb(209 213 219);bg-gray-400background-color: rgb(156 163 175);bg-gray-500background-color: rgb(107 114 128);bg-gray-600background-color: rgb(75 85 99);bg-gray-700background-color: rgb(55 65 81);bg-gray-800background-color: rgb(31 41 55);bg-gray-900background-color: rgb(17 24 39);bg-red-500background-color: rgb(239 68 68);bg-red-600background-color: rgb(220 38 38);bg-orange-500background-color: rgb(249 115 22);bg-yellow-500background-color: rgb(234 179 8);bg-green-500background-color: rgb(34 197 94);bg-green-600background-color: rgb(22 163 74);bg-blue-500background-color: rgb(59 130 246);bg-blue-600background-color: rgb(37 99 235);bg-indigo-500background-color: rgb(99 102 241);bg-purple-500background-color: rgb(168 85 247);bg-pink-500background-color: rgb(236 72 153);Borders
borderborder-width: 1px;border-0border-width: 0px;border-2border-width: 2px;border-4border-width: 4px;border-8border-width: 8px;border-tborder-top-width: 1px;border-rborder-right-width: 1px;border-bborder-bottom-width: 1px;border-lborder-left-width: 1px;border-solidborder-style: solid;border-dashedborder-style: dashed;border-dottedborder-style: dotted;border-noneborder-style: none;border-gray-200border-color: rgb(229 231 235);border-gray-300border-color: rgb(209 213 219);border-gray-400border-color: rgb(156 163 175);border-blue-500border-color: rgb(59 130 246);rounded-noneborder-radius: 0px;rounded-smborder-radius: 0.125rem;roundedborder-radius: 0.25rem;rounded-mdborder-radius: 0.375rem;rounded-lgborder-radius: 0.5rem;rounded-xlborder-radius: 0.75rem;rounded-2xlborder-radius: 1rem;rounded-3xlborder-radius: 1.5rem;rounded-fullborder-radius: 9999px;rounded-t-lgborder-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem;rounded-r-lgborder-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem;rounded-b-lgborder-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem;rounded-l-lgborder-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem;Effects
shadow-smbox-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);shadowbox-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);shadow-mdbox-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);shadow-lgbox-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);shadow-xlbox-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);shadow-2xlbox-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);shadow-nonebox-shadow: 0 0 #0000;opacity-0opacity: 0;opacity-25opacity: 0.25;opacity-50opacity: 0.5;opacity-75opacity: 0.75;opacity-100opacity: 1;blur-nonefilter: blur(0);blur-smfilter: blur(4px);blurfilter: blur(8px);blur-lgfilter: blur(16px);brightness-0filter: brightness(0);brightness-50filter: brightness(.5);brightness-100filter: brightness(1);brightness-150filter: brightness(1.5);contrast-0filter: contrast(0);contrast-50filter: contrast(.5);contrast-100filter: contrast(1);grayscalefilter: grayscale(100%);grayscale-0filter: grayscale(0);sepiafilter: sepia(100%);sepia-0filter: sepia(0);Transitions
transition-nonetransition-property: none;transition-alltransition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;transitiontransition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-colorstransition-property: color, background-color, border-color, text-decoration-color, fill, stroke;transition-opacitytransition-property: opacity;transition-shadowtransition-property: box-shadow;transition-transformtransition-property: transform;duration-75transition-duration: 75ms;duration-100transition-duration: 100ms;duration-150transition-duration: 150ms;duration-200transition-duration: 200ms;duration-300transition-duration: 300ms;duration-500transition-duration: 500ms;duration-700transition-duration: 700ms;ease-lineartransition-timing-function: linear;ease-intransition-timing-function: cubic-bezier(0.4, 0, 1, 1);ease-outtransition-timing-function: cubic-bezier(0, 0, 0.2, 1);ease-in-outtransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);Transforms
scale-0transform: scale(0);scale-50transform: scale(.5);scale-75transform: scale(.75);scale-90transform: scale(.9);scale-95transform: scale(.95);scale-100transform: scale(1);scale-105transform: scale(1.05);scale-110transform: scale(1.1);scale-125transform: scale(1.25);rotate-0transform: rotate(0deg);rotate-45transform: rotate(45deg);rotate-90transform: rotate(90deg);rotate-180transform: rotate(180deg);-rotate-45transform: rotate(-45deg);-rotate-90transform: rotate(-90deg);translate-x-0transform: translateX(0);translate-x-1transform: translateX(0.25rem);translate-x-2transform: translateX(0.5rem);translate-y-0transform: translateY(0);translate-y-1transform: translateY(0.25rem);translate-y-2transform: translateY(0.5rem);skew-x-0transform: skewX(0deg);skew-x-3transform: skewX(3deg);skew-x-6transform: skewX(6deg);skew-y-3transform: skewY(3deg);Interactivity
cursor-autocursor: auto;cursor-defaultcursor: default;cursor-pointercursor: pointer;cursor-waitcursor: wait;cursor-textcursor: text;cursor-movecursor: move;cursor-not-allowedcursor: not-allowed;pointer-events-nonepointer-events: none;pointer-events-autopointer-events: auto;select-noneuser-select: none;select-textuser-select: text;select-alluser-select: all;select-autouser-select: auto;resize-noneresize: none;resizeresize: both;resize-xresize: horizontal;resize-yresize: vertical;Spacing scale
00rem (0px)10.25rem (4px)20.5rem (8px)30.75rem (12px)41rem (16px)51.25rem (20px)61.5rem (24px)82rem (32px)102.5rem (40px)123rem (48px)164rem (64px)205rem (80px)246rem (96px)Color palette
Quick tips
- Click any utility to copy the class name to clipboard
- Hover states: Add
hover:prefix (e.g.,hover:bg-blue-500) - Responsive: Add breakpoint prefix (e.g.,
md:flex,lg:grid) - Dark mode: Add
dark:prefix (e.g.,dark:bg-gray-800) - Arbitrary values: Use square brackets for custom values (e.g.,
w-[137px])
Updated . Provided as is. Check the output before you rely on it in production.
How to use Tailwind CSS Reference & Cheat Sheet
- 1
Search by utility name
Type in the search box to find utilities such as flex, text-center or bg-blue. Results show the class name and its CSS.
- 2
Explore by category
Browse categories such as Layout, Flexbox, Grid, Spacing, Typography, Colors and Effects, with a live preview for each utility.
- 3
Add variants
Prefix any utility with a responsive (sm:, md:, lg:), state (hover:, focus:) or dark: variant. The Quick Tips panel shows the syntax.
- 4
Build your class string
Click a utility to copy it, then combine utilities in a single class attribute.
- 5
Plan responsive behavior
Prefix utilities with breakpoints: base, sm (640px), md (768px), lg (1024px) and xl (1280px), then check the result in your own layout at each width.
Questions and answers
What is Tailwind CSS Reference?
Which version of Tailwind CSS does this reference cover?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/tailwind-reference/
For automation planning, fetch the canonical contract at /api/tool/tailwind-reference.json.