Tailwind CSS Cheatsheet
Runs in browserSearch and browse common Tailwind CSS utility classes with CSS equivalents and live previews. Filter by category and copy class names instantly.
Tailwind CSS Cheatsheet tool
161 classes
flexdisplay: flex;
flex-colflex-direction: column;
flex-rowflex-direction: row;
griddisplay: grid;
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));
hiddendisplay: none;
(element hidden)blockdisplay: block;
inline-flexdisplay: inline-flex;
items-centeralign-items: center;
items-startalign-items: flex-start;
justify-betweenjustify-content: space-between;
justify-centerjustify-content: center;
gap-1gap: 0.25rem;
gap-2gap: 0.5rem;
gap-3gap: 0.75rem;
gap-4gap: 1rem;
gap-5gap: 1.25rem;
gap-6gap: 1.5rem;
gap-8gap: 2rem;
flex-wrapflex-wrap: wrap;
flex-1flex: 1 1 0%;
shrink-0flex-shrink: 0;
overflow-hiddenoverflow: hidden;
overflow-autooverflow: auto;
overflow-y-autooverflow-y: auto;
relativeposition: relative;
absoluteposition: absolute;
fixedposition: fixed;
stickyposition: sticky;
z-10z-index: 10;
z-50z-index: 50;
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;
px-4padding-left: 1rem; padding-right: 1rem;
py-2padding-top: 0.5rem; padding-bottom: 0.5rem;
m-1margin: 0.25rem;
m-2margin: 0.5rem;
m-3margin: 0.75rem;
m-4margin: 1rem;
m-5margin: 1.25rem;
m-6margin: 1.5rem;
m-8margin: 2rem;
mx-automargin-left: auto; margin-right: auto;
mt-4margin-top: 1rem;
mb-4margin-bottom: 1rem;
space-x-4margin-left: 1rem; (between children)
space-y-4margin-top: 1rem; (between children)
w-fullwidth: 100%;
w-1/2width: 50%;
w-screenwidth: 100vw;
h-fullheight: 100%;
h-screenheight: 100vh;
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-6xlmax-width: 72rem;
min-h-screenmin-height: 100vh;
aspect-squareaspect-ratio: 1 / 1;
text-xsfont-size: 0.75rem;
Sample texttext-smfont-size: 0.875rem;
Sample texttext-basefont-size: 1rem;
Sample texttext-lgfont-size: 1.125rem;
Sample texttext-xlfont-size: 1.25rem;
Sample texttext-2xlfont-size: 1.5rem;
Sample texttext-3xlfont-size: 1.875rem;
Sample texttext-4xlfont-size: 2.25rem;
Sample textfont-normalfont-weight: 400;
font-mediumfont-weight: 500;
font-semiboldfont-weight: 600;
font-boldfont-weight: 700;
text-lefttext-align: left;
Sample texttext-centertext-align: center;
Sample texttext-righttext-align: right;
Sample textleading-noneline-height: 1;
leading-tightline-height: 1.25;
leading-normalline-height: 1.5;
leading-looseline-height: 2;
tracking-tightletter-spacing: -0.025em;
tracking-normalletter-spacing: 0;
tracking-wideletter-spacing: 0.025em;
uppercasetext-transform: uppercase;
lowercasetext-transform: lowercase;
capitalizetext-transform: capitalize;
truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrap;
line-clamp-2display: -webkit-box; -webkit-line-clamp: 2;
line-clamp-3display: -webkit-box; -webkit-line-clamp: 3;
bg-slate-50background-color: (slate palette 50);
bg-slate-100background-color: (slate palette 100);
bg-slate-200background-color: (slate palette 200);
bg-slate-300background-color: (slate palette 300);
bg-slate-400background-color: (slate palette 400);
bg-slate-500background-color: (slate palette 500);
bg-slate-600background-color: (slate palette 600);
bg-slate-700background-color: (slate palette 700);
bg-slate-800background-color: (slate palette 800);
bg-slate-900background-color: (slate palette 900);
bg-blue-500background-color: #3b82f6;
bg-green-500background-color: #22c55e;
bg-red-500background-color: #ef4444;
bg-yellow-500background-color: #eab308;
bg-purple-500background-color: #a855f7;
bg-indigo-500background-color: #6366f1;
bg-whitebackground-color: #fff;
bg-blackbackground-color: #000;
bg-transparentbackground-color: transparent;
text-slate-50color: (slate palette 50);
Sample texttext-slate-100color: (slate palette 100);
Sample texttext-slate-200color: (slate palette 200);
Sample texttext-slate-300color: (slate palette 300);
Sample texttext-slate-400color: (slate palette 400);
Sample texttext-slate-500color: (slate palette 500);
Sample texttext-slate-600color: (slate palette 600);
Sample texttext-slate-700color: (slate palette 700);
Sample texttext-slate-800color: (slate palette 800);
Sample texttext-slate-900color: (slate palette 900);
Sample texttext-whitecolor: #fff;
Sample texttext-blackcolor: #000;
Sample texttext-blue-500color: #3b82f6;
Sample texttext-green-500color: #22c55e;
Sample texttext-red-500color: #ef4444;
Sample texttext-yellow-500color: #eab308;
Sample textborderborder-width: 1px;
border-2border-width: 2px;
border-slate-200border-color: #e2e8f0;
border-slate-700border-color: #334155;
roundedborder-radius: 0.25rem;
rounded-mdborder-radius: 0.375rem;
rounded-lgborder-radius: 0.5rem;
rounded-xlborder-radius: 0.75rem;
rounded-fullborder-radius: 9999px;
border-noneborder-style: none;
shadow-smbox-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
shadow-mdbox-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
shadow-lgbox-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
shadow-xlbox-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
shadow-2xlbox-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
opacity-0opacity: 0;
opacity-50opacity: 0.5;
opacity-100opacity: 1;
blur-smfilter: blur(4px);
blur-mdfilter: blur(12px);
backdrop-blur-smbackdrop-filter: blur(4px);
backdrop-blur-mdbackdrop-filter: blur(12px);
transition-alltransition-property: all;
transition-colorstransition-property: color, background-color, border-color;
duration-150transition-duration: 150ms;
duration-300transition-duration: 300ms;
ease-intransition-timing-function: cubic-bezier(0.4, 0, 1, 1);
ease-outtransition-timing-function: cubic-bezier(0, 0, 0.2, 1);
hover:bg-slate-700background-color (on :hover);
Hover mehover:opacity-80opacity: 0.8 (on :hover);
Hover mehover:scale-105transform: scale(1.05) (on :hover);
Hover me
Chain to another tool
Send this output to another tool instantly — no copy-paste needed.
Produce output above to enable chaining.
How to use
Search
Filter by text (class name or CSS snippet) and narrow with category chips.
Preview
Each card shows a compact visual when the utility applies to a box or text.
Copy
Copy a utility name to paste into your className or HTML.
Examples
Spacing
Try searching “p-4” or “gap”.
InputOutputp-4
Frequently asked questions
- Is this every Tailwind class?
- No. The cheatsheet lists common utilities (~200) for quick reference.
- Does preview use my Tailwind build?
- Previews use this site’s Tailwind setup; your project theme may differ slightly.
Related tools
You might find these useful too.