Tailwind CSS Quick Reference
Search utility classes by name or CSS property. Click any class to copy it.
Showing 187 of 187 classesClick any class to copy
Layout(25)
containermax-width: breakpoint width
Sets max-width based on current breakpoint
blockdisplay: block
Sets display to block
inline-blockdisplay: inline-block
Sets display to inline-block
inlinedisplay: inline
Sets display to inline
flexdisplay: flex
Sets display to flex
inline-flexdisplay: inline-flex
Sets display to inline-flex
griddisplay: grid
Sets display to grid
hiddendisplay: none
Hides element (display none)
overflow-autooverflow: auto
Adds scrollbar only when needed
overflow-hiddenoverflow: hidden
Clips overflowing content
overflow-scrolloverflow: scroll
Always shows scrollbar
overflow-x-autooverflow-x: auto
Horizontal scrollbar when needed
overflow-y-autooverflow-y: auto
Vertical scrollbar when needed
relativeposition: relative
Positions element relative to normal flow
absoluteposition: absolute
Removes from flow, positions to nearest positioned ancestor
fixedposition: fixed
Positions relative to viewport
stickyposition: sticky
Sticks to nearest scroll container
top-0top: 0px
Pins element to top edge
right-0right: 0px
Pins element to right edge
bottom-0bottom: 0px
Pins element to bottom edge
left-0left: 0px
Pins element to left edge
inset-0top: 0; right: 0; bottom: 0; left: 0
Pins all edges to 0 (full cover)
z-10z-index: 10
Sets stacking order to 10
z-20z-index: 20
Sets stacking order to 20
z-50z-index: 50
Sets stacking order to 50
Flexbox & Grid(24)
flex-rowflex-direction: row
Main axis goes left to right
flex-colflex-direction: column
Main axis goes top to bottom
flex-wrapflex-wrap: wrap
Items wrap to next line when overflow
flex-nowrapflex-wrap: nowrap
Items never wrap
justify-startjustify-content: flex-start
Items packed to start of main axis
justify-centerjustify-content: center
Items centered on main axis
justify-endjustify-content: flex-end
Items packed to end of main axis
justify-betweenjustify-content: space-between
Equal space between items
justify-aroundjustify-content: space-around
Equal space around items
justify-evenlyjustify-content: space-evenly
Equal space between and around items
items-startalign-items: flex-start
Align items to start of cross axis
items-centeralign-items: center
Align items to center of cross axis
items-endalign-items: flex-end
Align items to end of cross axis
items-stretchalign-items: stretch
Stretch items to fill cross axis
flex-1flex: 1 1 0%
Grow and shrink as needed, ignoring initial size
flex-autoflex: 1 1 auto
Grow and shrink based on initial size
flex-noneflex: none
Prevent item from growing or shrinking
flex-growflex-grow: 1
Allow item to grow to fill available space
flex-shrinkflex-shrink: 1
Allow item to shrink when needed
grid-cols-1grid-template-columns: repeat(1, minmax(0, 1fr))
1-column grid
grid-cols-2grid-template-columns: repeat(2, minmax(0, 1fr))
2-column grid
grid-cols-3grid-template-columns: repeat(3, minmax(0, 1fr))
3-column grid
col-span-2grid-column: span 2 / span 2
Span 2 grid columns
col-span-fullgrid-column: 1 / -1
Span all grid columns
Spacing(29)
p-0padding: 0px
Remove all padding
p-1padding: 0.25rem
4px padding all sides
p-2padding: 0.5rem
8px padding all sides
p-4padding: 1rem
16px padding all sides
p-6padding: 1.5rem
24px padding all sides
p-8padding: 2rem
32px padding all sides
px-4padding-left: 1rem; padding-right: 1rem
16px horizontal padding
py-4padding-top: 1rem; padding-bottom: 1rem
16px vertical padding
pt-4padding-top: 1rem
16px top padding
pr-4padding-right: 1rem
16px right padding
pb-4padding-bottom: 1rem
16px bottom padding
pl-4padding-left: 1rem
16px left padding
m-0margin: 0px
Remove all margin
m-1margin: 0.25rem
4px margin all sides
m-2margin: 0.5rem
8px margin all sides
m-4margin: 1rem
16px margin all sides
mx-automargin-left: auto; margin-right: auto
Center element horizontally
my-automargin-top: auto; margin-bottom: auto
Center element vertically
mt-4margin-top: 1rem
16px top margin
mb-4margin-bottom: 1rem
16px bottom margin
space-x-2> * + * { margin-left: 0.5rem }
8px horizontal gap between children
space-x-4> * + * { margin-left: 1rem }
16px horizontal gap between children
space-y-2> * + * { margin-top: 0.5rem }
8px vertical gap between children
space-y-4> * + * { margin-top: 1rem }
16px vertical gap between children
gap-1gap: 0.25rem
4px gap between grid/flex items
gap-2gap: 0.5rem
8px gap between grid/flex items
gap-4gap: 1rem
16px gap between grid/flex items
gap-6gap: 1.5rem
24px gap between grid/flex items
gap-8gap: 2rem
32px gap between grid/flex items
Sizing(18)
w-fullwidth: 100%
Full width of parent
w-screenwidth: 100vw
Full viewport width
w-autowidth: auto
Browser-determined width
w-1/2width: 50%
Half the parent width
w-1/3width: 33.333333%
One third the parent width
w-2/3width: 66.666667%
Two thirds the parent width
w-1/4width: 25%
One quarter the parent width
w-3/4width: 75%
Three quarters the parent width
max-w-xsmax-width: 20rem
Max width 320px
max-w-smmax-width: 24rem
Max width 384px
max-w-mdmax-width: 28rem
Max width 448px
max-w-lgmax-width: 32rem
Max width 512px
max-w-xlmax-width: 36rem
Max width 576px
max-w-2xlmax-width: 42rem
Max width 672px
max-w-fullmax-width: 100%
Max width is 100% of parent
h-fullheight: 100%
Full height of parent
h-screenheight: 100vh
Full viewport height
min-h-screenmin-height: 100vh
Minimum full viewport height
Typography(28)
text-xsfont-size: 0.75rem; line-height: 1rem
Extra small text (12px)
text-smfont-size: 0.875rem; line-height: 1.25rem
Small text (14px)
text-basefont-size: 1rem; line-height: 1.5rem
Base text size (16px)
text-lgfont-size: 1.125rem; line-height: 1.75rem
Large text (18px)
text-xlfont-size: 1.25rem; line-height: 1.75rem
Extra large text (20px)
text-2xlfont-size: 1.5rem; line-height: 2rem
2x large text (24px)
text-3xlfont-size: 1.875rem; line-height: 2.25rem
3x large text (30px)
text-4xlfont-size: 2.25rem; line-height: 2.5rem
4x large text (36px)
font-normalfont-weight: 400
Normal font weight
font-mediumfont-weight: 500
Medium font weight
font-semiboldfont-weight: 600
Semi-bold font weight
font-boldfont-weight: 700
Bold font weight
leading-noneline-height: 1
No extra line height
leading-tightline-height: 1.25
Tight line height
leading-normalline-height: 1.5
Normal line height
leading-relaxedline-height: 1.625
Relaxed line height
tracking-tightletter-spacing: -0.05em
Tighter letter spacing
tracking-normalletter-spacing: 0em
Normal letter spacing
tracking-wideletter-spacing: 0.025em
Wider letter spacing
text-lefttext-align: left
Left-align text
text-centertext-align: center
Center-align text
text-righttext-align: right
Right-align text
truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrap
Truncate text with ellipsis
uppercasetext-transform: uppercase
Transform text to uppercase
lowercasetext-transform: lowercase
Transform text to lowercase
capitalizetext-transform: capitalize
Capitalize first letter of each word
italicfont-style: italic
Italic text
not-italicfont-style: normal
Remove italic style
Colors(16)
text-whitecolor: rgb(255 255 255)
White text color
text-blackcolor: rgb(0 0 0)
Black text color
text-gray-500color: rgb(107 114 128)
Gray text (medium)
text-gray-700color: rgb(55 65 81)
Dark gray text
text-blue-500color: rgb(59 130 246)
Blue text
text-blue-600color: rgb(37 99 235)
Darker blue text
text-red-500color: rgb(239 68 68)
Red text
text-green-500color: rgb(34 197 94)
Green text
bg-whitebackground-color: rgb(255 255 255)
White background
bg-blackbackground-color: rgb(0 0 0)
Black background
bg-gray-100background-color: rgb(243 244 246)
Very light gray background
bg-gray-900background-color: rgb(17 24 39)
Very dark gray background
bg-blue-500background-color: rgb(59 130 246)
Blue background
bg-red-500background-color: rgb(239 68 68)
Red background
bg-green-500background-color: rgb(34 197 94)
Green background
bg-transparentbackground-color: transparent
Transparent background
Borders(15)
borderborder-width: 1px
1px border on all sides
border-2border-width: 2px
2px border on all sides
border-0border-width: 0px
Remove border
border-tborder-top-width: 1px
1px top border only
border-bborder-bottom-width: 1px
1px bottom border only
border-solidborder-style: solid
Solid border style
border-dashedborder-style: dashed
Dashed border style
roundedborder-radius: 0.25rem
Small border radius (4px)
rounded-mdborder-radius: 0.375rem
Medium border radius (6px)
rounded-lgborder-radius: 0.5rem
Large border radius (8px)
rounded-xlborder-radius: 0.75rem
Extra large border radius (12px)
rounded-2xlborder-radius: 1rem
2x large border radius (16px)
rounded-fullborder-radius: 9999px
Fully rounded (pill / circle)
divide-xborder-right-width: 0; border-left-width: 1px (between)
Adds vertical divider between children
divide-yborder-top-width: 0; border-bottom-width: 1px (between)
Adds horizontal divider between children
Effects(13)
shadow-smbox-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05)
Small box shadow
shadowbox-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1)
Default box shadow
shadow-mdbox-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1)
Medium box shadow
shadow-lgbox-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1)
Large box shadow
shadow-xlbox-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1)
Extra large box shadow
shadow-nonebox-shadow: 0 0 #0000
Remove box shadow
opacity-0opacity: 0
Fully transparent
opacity-50opacity: 0.5
Half transparent
opacity-100opacity: 1
Fully opaque
ringbox-shadow: 0 0 0 3px var(--tw-ring-color)
Adds ring (focus outline effect)
blurfilter: blur(8px)
Blurs element (8px)
blur-smfilter: blur(4px)
Slightly blurs element (4px)
backdrop-blurbackdrop-filter: blur(8px)
Blurs content behind element
Transforms(9)
scale-100transform: scale(1)
No scale transformation
scale-95transform: scale(0.95)
Scale down to 95%
scale-105transform: scale(1.05)
Scale up to 105%
rotate-45transform: rotate(45deg)
Rotate 45 degrees
rotate-90transform: rotate(90deg)
Rotate 90 degrees
rotate-180transform: rotate(180deg)
Rotate 180 degrees
translate-x-1transform: translateX(0.25rem)
Move right 4px
translate-y-1transform: translateY(0.25rem)
Move down 4px
-translate-y-1transform: translateY(-0.25rem)
Move up 4px
Transitions(10)
transitiontransition: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter 150ms ease
Transition all common properties
transition-colorstransition: color, background-color, border-color 150ms ease
Transition only color properties
transition-opacitytransition: opacity 150ms ease
Transition opacity only
transition-transformtransition: transform 150ms ease
Transition transform only
duration-150transition-duration: 150ms
150ms transition duration
duration-300transition-duration: 300ms
300ms transition duration
duration-500transition-duration: 500ms
500ms transition duration
ease-intransition-timing-function: cubic-bezier(0.4, 0, 1, 1)
Start slow, end fast
ease-outtransition-timing-function: cubic-bezier(0, 0, 0.2, 1)
Start fast, end slow
ease-in-outtransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)
Slow at both ends