Tailwind CSS Cheat Sheet
Tailwind CSS Cheat Sheet
Cheatsheet 3.0.24
Search
Expand All
Collapse All
Back to components
Source Code On
“Never memorize something that you can look up.” - Albert Einstein
Layout
aspect-square aspect-ratio: 1 / 1;
aspect-video aspect-ratio: 16 / 9;
Container DOCS
Columns DOCS
columns-1 columns: 1;
columns-2 columns: 2;
columns-3 columns: 3;
columns-4 columns: 4;
columns-5 columns: 5;
columns-6 columns: 6;
columns-7 columns: 7;
columns-8 columns: 8;
columns-9 columns: 9;
Utilities for controlling how a column or page should break after an element.
Utilities for controlling how a column or page should break before an element.
Utilities for controlling how a column or page should break within an element.
break-inside-auto break-inside: auto;
Utilities for controlling how element fragments should be rendered across multiple
lines, columns, or pages.
Display DOCS
Float DOCS
Sets an element's placement to a side of its container and allows content to wrap
around it.
Clear DOCS
Isolation DOCS
Overflow DOCS
Sets how to handle content that's too big for its container.
Sets of utilities for controlling how the browser behaves when reaching the boundary
of a scrolling area.
Position DOCS
top-0 top: 0;
right-0 right: 0;
bottom-0 bottom: 0;
left-0 left: 0;
-top-0 top: 0;
-right-0 right: 0;
-bottom-0 bottom: 0;
-left-0 left: 0;
Visibility DOCS
Z-index DOCS
z-0 z-index: 0;
Spacing
Padding DOCS
p-0 padding: 0;
pt-0 padding-top: 0;
pr-0 padding-right: 0;
pb-0 padding-bottom: 0;
pl-0 padding-left: 0;
Margin DOCS
m-0 margin: 0;
mt-0 margin-top: 0;
mr-0 margin-right: 0;
mb-0 margin-bottom: 0;
ml-0 margin-left: 0;
-m-0 margin: 0;
-mt-0 margin-top: 0;
-mr-0 margin-right: 0;
-mb-0 margin-bottom: 0;
-ml-0 margin-left: 0;
-space-x-0 margin-left: 0;
space-y-0 margin-top: 0;
-space-y-0 margin-top: 0;
space-x-reverse --space-x-reverse: 1
space-y-reverse --space-y-reverse: 1
Flex DOCS
flex-grow flex-grow: 1;
grow-0 flex-grow: 0;
shrink shrink: 1;
shrink-0 shrink: 0;
Order DOCS
order-none order: 0;
order-1 order: 1;
order-2 order: 2;
order-3 order: 3;
order-4 order: 4;
order-5 order: 5;
order-6 order: 6;
order-7 order: 7;
order-8 order: 8;
order-9 order: 9;
Sets a grid item size and location within the grid column.
col-start-2 grid-column-start: 2;
col-start-3 grid-column-start: 3;
col-start-4 grid-column-start: 4;
col-start-5 grid-column-start: 5;
col-start-6 grid-column-start: 6;
col-start-7 grid-column-start: 7;
col-start-8 grid-column-start: 8;
col-start-9 grid-column-start: 9;
col-end-1 grid-column-end: 1;
col-end-2 grid-column-end: 2;
col-end-3 grid-column-end: 3;
col-end-4 grid-column-end: 4;
col-end-5 grid-column-end: 5;
col-end-6 grid-column-end: 6;
col-end-7 grid-column-end: 7;
col-end-8 grid-column-end: 8;
col-end-9 grid-column-end: 9;
Sets a grid item size and location within the grid row.
row-start-1 grid-row-start: 1;
row-start-2 grid-row-start: 2;
row-start-3 grid-row-start: 3;
row-start-4 grid-row-start: 4;
row-start-5 grid-row-start: 5;
row-start-6 grid-row-start: 6;
row-start-7 grid-row-start: 7;
row-end-1 grid-row-end: 1;
row-end-2 grid-row-end: 2;
row-end-3 grid-row-end: 3;
row-end-4 grid-row-end: 4;
row-end-5 grid-row-end: 5;
row-end-6 grid-row-end: 6;
row-end-7 grid-row-end: 7;
Gap DOCS
Sets the gaps (gutters) between rows and columns.
gap-0 gap: 0;
gap-x-0 column-gap: 0;
gap-y-0 row-gap: 0;
Utilities for controlling how flex and grid items are positioned along a container's main
axis.
Utilities for controlling how grid items are aligned along their inline axis.
Utilities for controlling how an individual grid item is aligned along its inline axis.
justify-self-stretch justify-self: stretch;
Utilities for controlling how rows are positioned in multi-row flex and grid containers.
Controls how an individual flex item is positioned along container's cross axis.
Utilities for controlling how content is justified and aligned at the same time.
Utilities for controlling how items are justified and aligned at the same time.
Utilities for controlling how an individual item is justified and aligned at the same time.
Borders
Border Radius DOCS
rounded-none border-radius: 0;
rounded-tl-none border-top-left-radius: 0;
rounded-tr-none border-top-right-radius: 0;
rounded-br-none border-bottom-right-radius: 0;
rounded-bl-none border-bottom-left-radius: 0;
border-0 border-width: 0;
border-t-0 border-top-width: 0;
border-r-0 border-right-width: 0;
border-b-0 border-bottom-width: 0;
border-l-0 border-left-width: 0;
border-opacity-0 border-opacity: 0;
border-opacity-100 border-opacity: 1;
divide-x-0 border-left-width: 0;
divide-y-0 border-top-width: 0;
divide-x-reverse --divide-x-reverse: 1
divide-y-reverse --divide-y-reverse: 1
divide-opacity-0 --divide-opacity: 0;
divide-opacity-100 --divide-opacity: 1;
ring-opacity-0 --ring-opacity: 0;
ring-opacity-100 --ring-opacity: 1;
Sizing
Width DOCS
w-0 width: 0;
min-w-0 min-width: 0;
Height DOCS
h-0 height: 0;
min-h-0 min-height: 0;
max-h-0 max-height: 0;
Typography
tracking-normal letter-spacing: 0;
leading-none line-height: 1;
leading-loose line-height: 2;
Utilities for controlling the amount of empty space shown before text in a block.
indent-0 text-indent: 0;
Content DOCS
Utilities for controlling the content of the before and after pseudo-elements.
Sets behavior of Utilities for controlling the bounding box of an element's background.
bg-opacity-0 --bg-opacity: 0;
bg-opacity-100 --bg-opacity: 1;
Animation DOCS
Transforms
Scale DOCS
scale-x-100 --transform-scale-x: 1;
scale-y-0 --transform-scale-y: 0;
scale-y-100 --transform-scale-y: 1;
Rotate DOCS
rotate-0 --transform-rotate: 0;
Translate DOCS
translate-x-0 --transform-translate-x: 0;
translate-y-0 --transform-translate-y: 0;
Skew DOCS
skew-x-0 --transform-skew-x: 0;
skew-y-0 --transform-skew-y: 0;
Sets the origin of an element's transforms. Think of the origin as pushing a thumbtack
into the element at the specified position.
Interactivity
Appearance DOCS
Cursor DOCS
Resize DOCS
Utilities for controlling the scroll offset around items in a snap container.
scroll-m-0 scroll-margin: 0;
scroll-mt-0 scroll-margin-top: 0;
scroll-mr-0 scroll-margin-right: 0;
scroll-mb-0 scroll-margin-bottom: 0;
scroll-ml-0 scroll-margin-left: 0;
scroll-p-0 scroll-padding: 0;
scroll-pt-0 scroll-padding-top: 0;
scroll-pr-0 scroll-padding-right: 0;
scroll-pb-0 scroll-padding-bottom: 0;
scroll-pl-0 scroll-padding-left: 0;
Utilities for controlling whether you can skip past possible snap positions..
Utilities for controlling how strictly snap points are enforced in a snap container.
Utilities for controlling how an element can be scrolled and zoomed on touchscreens.
Utilities for optimizing upcoming animations of elements that are expected to change.
SVG
Fill DOCS
Stroke DOCS
stroke-0 stroke-width: 0;
stroke-1 stroke-width: 1;
stroke-2 stroke-width: 2;
Tables
Defines the algorithm used to lay out table cells, rows, and columns.
Effects
shadow-lg box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px
rgba(0, 0, 0, 0.05);
Opacity DOCS
opacity-0 opacity: 0;
opacity-100 opacity: 1;
Utilities for controlling how an element should blend with the background.
Utilities for controlling how an element's background image should blend with its
background color.
Filters
Blur DOCS
Brightness DOCS
Grayscale DOCS
Invert DOCS
Saturate DOCS
Sepia DOCS
Accessibility