Skip to main content
appkiro.com

Cheat Sheet Tailwind CSS

Tìm utility class nhanh và xem ý nghĩa CSS, với phiên bản Tailwind cùng ngày review hiển thị rõ.

Công cụ lập trình & văn bản

Trả lời trực tiếp

Không. Chỉ dùng trang này với dữ liệu kiểm thử có thể hủy. Hãy tạo secret ví production bằng quy trình offline đã được rà soát và kiểm tra mọi bản sao lưu mà không làm lộ cụm từ hoặc khóa.

ClassCSS
sm:e.g. sm:flex@media (min-width: 640px)
md:e.g. md:grid-cols-2@media (min-width: 768px)
lg:e.g. lg:px-8@media (min-width: 1024px)
xl:e.g. xl:max-w-6xl@media (min-width: 1280px)
2xl:e.g. 2xl:text-lg@media (min-width: 1536px)
ClassCSS
blockdisplay: block
inline-blockdisplay: inline-block
inlinedisplay: inline
flexdisplay: flex
inline-flexdisplay: inline-flex
griddisplay: grid
inline-griddisplay: inline-grid
hiddendisplay: none
contentsdisplay: contents
ClassCSS
staticposition: static
fixedposition: fixed
absoluteposition: absolute
relativeposition: relative
stickyposition: sticky
inset-0inset: 0
inset-x-0left: 0; right: 0
inset-y-0top: 0; bottom: 0
top-0top: 0
right-0right: 0
bottom-0bottom: 0
left-0left: 0
ClassCSS
flex-rowflex-direction: row
flex-colflex-direction: column
flex-wrapflex-wrap: wrap
flex-nowrapflex-wrap: nowrap
flex-1flex: 1 1 0%
flex-autoflex: 1 1 auto
flex-noneflex: none
growflex-grow: 1
grow-0flex-grow: 0
shrinkflex-shrink: 1
shrink-0flex-shrink: 0
ClassCSS
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-12grid-template-columns: repeat(12, minmax(0, 1fr))
col-span-1grid-column: span 1 / span 1
col-span-2grid-column: span 2 / span 2
col-span-fullgrid-column: 1 / -1
grid-rows-1grid-template-rows: repeat(1, minmax(0, 1fr))
grid-rows-2grid-template-rows: repeat(2, minmax(0, 1fr))
ClassCSS
justify-startjustify-content: flex-start
justify-centerjustify-content: center
justify-endjustify-content: flex-end
justify-betweenjustify-content: space-between
justify-aroundjustify-content: space-around
justify-evenlyjustify-content: space-evenly
items-startalign-items: flex-start
items-centeralign-items: center
items-endalign-items: flex-end
items-baselinealign-items: baseline
items-stretchalign-items: stretch
self-autoalign-self: auto
self-startalign-self: flex-start
self-centeralign-self: center
self-endalign-self: flex-end
ClassCSS
p-0padding: 0
p-1padding: 0.25rem (4px)
p-2padding: 0.5rem (8px)
p-4padding: 1rem (16px)
p-6padding: 1.5rem (24px)
p-8padding: 2rem (32px)
px-*padding-left & padding-right
py-*padding-top & padding-bottom
pt/pr/pb/pl-*padding-[side]
m-0margin: 0
m-1margin: 0.25rem (4px)
m-2margin: 0.5rem (8px)
m-4margin: 1rem (16px)
m-automargin: auto
-m-1margin: -0.25rem
mx-automargin-left: auto; margin-right: auto
gap-0gap: 0
gap-1gap: 0.25rem (4px)
gap-2gap: 0.5rem (8px)
gap-4gap: 1rem (16px)
gap-x-*column-gap
gap-y-*row-gap
ClassCSS
w-0width: 0
w-1width: 0.25rem (4px)
w-4width: 1rem (16px)
w-fullwidth: 100%
w-screenwidth: 100vw
w-autowidth: auto
w-1/2width: 50%
w-1/3width: 33.333%
w-fitwidth: fit-content
min-w-0min-width: 0
min-w-fullmin-width: 100%
max-w-smmax-width: 24rem (384px)
max-w-mdmax-width: 28rem (448px)
max-w-lgmax-width: 32rem (512px)
max-w-xlmax-width: 36rem (576px)
max-w-2xlmax-width: 42rem (672px)
max-w-fullmax-width: 100%
max-w-screen-smmax-width: 640px
max-w-screen-mdmax-width: 768px
max-w-screen-lgmax-width: 1024px
h-0height: 0
h-4height: 1rem (16px)
h-fullheight: 100%
h-screenheight: 100vh
h-autoheight: auto
min-h-0min-height: 0
min-h-fullmin-height: 100%
min-h-screenmin-height: 100vh
size-4width: 1rem; height: 1rem
size-6width: 1.5rem; height: 1.5rem
size-fullwidth: 100%; height: 100%
ClassCSS
text-xsfont-size: 0.75rem (12px)
text-smfont-size: 0.875rem (14px)
text-basefont-size: 1rem (16px)
text-lgfont-size: 1.125rem (18px)
text-xlfont-size: 1.25rem (20px)
text-2xlfont-size: 1.5rem (24px)
text-3xlfont-size: 1.875rem (30px)
text-4xlfont-size: 2.25rem (36px)
font-thinfont-weight: 100
font-lightfont-weight: 300
font-normalfont-weight: 400
font-mediumfont-weight: 500
font-semiboldfont-weight: 600
font-boldfont-weight: 700
font-sansfont-family: ui-sans-serif, system-ui, sans-serif
font-seriffont-family: ui-serif, Georgia, serif
font-monofont-family: ui-monospace, monospace
italicfont-style: italic
not-italicfont-style: normal
leading-noneline-height: 1
leading-tightline-height: 1.25
leading-normalline-height: 1.5
leading-relaxedline-height: 1.625
leading-looseline-height: 2
tracking-tightletter-spacing: -0.025em
tracking-normalletter-spacing: 0
tracking-wideletter-spacing: 0.025em
ClassCSS
text-lefttext-align: left
text-centertext-align: center
text-righttext-align: right
text-justifytext-align: justify
uppercasetext-transform: uppercase
lowercasetext-transform: lowercase
capitalizetext-transform: capitalize
normal-casetext-transform: none
underlinetext-decoration: underline
line-throughtext-decoration: line-through
no-underlinetext-decoration: none
truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrap
text-ellipsistext-overflow: ellipsis
text-cliptext-overflow: clip
whitespace-normalwhite-space: normal
whitespace-nowrapwhite-space: nowrap
whitespace-prewhite-space: pre
break-normalword-break: normal
break-wordsword-break: break-word
break-allword-break: break-all
line-clamp-1-webkit-line-clamp: 1
line-clamp-2-webkit-line-clamp: 2
line-clamp-3-webkit-line-clamp: 3
ClassCSS
bg-transparentbackground-color: transparent
bg-currentbackground-color: currentColor
bg-whitebackground-color: #fff
bg-blackbackground-color: #000
bg-slate-500background-color: #64748b
bg-[#hex]e.g. bg-[#1da1f2]background-color: #hex
bg-coverbackground-size: cover
bg-containbackground-size: contain
bg-centerbackground-position: center
bg-no-repeatbackground-repeat: no-repeat
bg-repeatbackground-repeat: repeat
bg-fixedbackground-attachment: fixed
bg-gradient-to-rbackground-image: linear-gradient(to right, ...)
bg-gradient-to-bbackground-image: linear-gradient(to bottom, ...)
from-blue-500gradient start color
via-purple-500gradient middle color
to-pink-500gradient end color
ClassCSS
borderborder-width: 1px
border-0border-width: 0
border-2border-width: 2px
border-4border-width: 4px
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
roundedborder-radius: 0.25rem (4px)
rounded-mdborder-radius: 0.375rem (6px)
rounded-lgborder-radius: 0.5rem (8px)
rounded-xlborder-radius: 0.75rem (12px)
rounded-2xlborder-radius: 1rem (16px)
rounded-fullborder-radius: 9999px
rounded-noneborder-radius: 0
rounded-t-lgborder-top-left/right-radius: 0.5rem
divide-xborder between horizontal children
divide-yborder between vertical children
ClassCSS
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)
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)
shadow-innerbox-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05)
shadow-nonebox-shadow: none
opacity-0opacity: 0
opacity-50opacity: 0.5
opacity-100opacity: 1
blurfilter: blur(8px)
blur-smfilter: blur(4px)
blur-lgfilter: blur(16px)
blur-nonefilter: blur(0)
backdrop-blurbackdrop-filter: blur(8px)
backdrop-blur-smbackdrop-filter: blur(4px)
ClassCSS
transitiontransition: all 150ms ease
transition-nonetransition: none
transition-colorstransition: color, background-color, border-color
transition-opacitytransition: opacity 150ms
transition-transformtransition: transform 150ms
duration-75transition-duration: 75ms
duration-150transition-duration: 150ms
duration-300transition-duration: 300ms
duration-500transition-duration: 500ms
ease-lineartransition-timing-function: linear
ease-intransition-timing-function: ease-in
ease-outtransition-timing-function: ease-out
ease-in-outtransition-timing-function: ease-in-out
delay-150transition-delay: 150ms
delay-300transition-delay: 300ms
animate-spinanimation: spin 1s linear infinite
animate-pinganimation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite
animate-pulseanimation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite
animate-bounceanimation: bounce 1s infinite
ClassCSS
scale-0transform: scale(0)
scale-50transform: scale(0.5)
scale-100transform: scale(1)
scale-150transform: scale(1.5)
rotate-0transform: rotate(0deg)
rotate-45transform: rotate(45deg)
rotate-90transform: rotate(90deg)
rotate-180transform: rotate(180deg)
-rotate-45transform: rotate(-45deg)
translate-x-0transform: translateX(0)
translate-x-4transform: translateX(1rem)
translate-x-fulltransform: translateX(100%)
-translate-x-4transform: translateX(-1rem)
translate-y-4transform: translateY(1rem)
skew-x-3transform: skewX(3deg)
skew-y-3transform: skewY(3deg)
origin-centertransform-origin: center
origin-toptransform-origin: top
ClassCSS
cursor-pointercursor: pointer
cursor-defaultcursor: default
cursor-not-allowedcursor: not-allowed
cursor-waitcursor: wait
cursor-grabcursor: grab
pointer-events-nonepointer-events: none
pointer-events-autopointer-events: auto
select-noneuser-select: none
select-textuser-select: text
select-alluser-select: all
resizeresize: both
resize-noneresize: none
resize-xresize: horizontal
resize-yresize: vertical
scroll-smoothscroll-behavior: smooth
scroll-autoscroll-behavior: auto
ClassCSS
hover:e.g. hover:bg-blue-600on mouse hover
focus:e.g. focus:ring-2on focus
focus-visible:e.g. focus-visible:outline-noneon keyboard focus
active:e.g. active:bg-blue-700on active/pressed
disabled:e.g. disabled:opacity-50when disabled
first:e.g. first:mt-0first child
last:e.g. last:mb-0last child
odd:e.g. odd:bg-gray-100odd children
even:e.g. even:bg-whiteeven children
group-hover:e.g. group-hover:visiblewhen parent .group is hovered
peer-focus:e.g. peer-focus:ringwhen sibling .peer is focused
dark:e.g. dark:bg-gray-900dark mode
motion-safe:e.g. motion-safe:animate-spinif user allows motion
motion-reduce:e.g. motion-reduce:animate-noneif user prefers reduced motion
ClassCSS
overflow-autooverflow: auto
overflow-hiddenoverflow: hidden
overflow-visibleoverflow: visible
overflow-scrolloverflow: scroll
overflow-x-autooverflow-x: auto
overflow-y-autooverflow-y: auto
overflow-x-hiddenoverflow-x: hidden
overflow-y-hiddenoverflow-y: 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
-z-10z-index: -10
Mẹo: Dùng giá trị tùy ý trong dấu ngoặc vuông:w-[200px],text-[#1da1f2],grid-cols-[1fr_2fr]

Cách sử dụng

  1. Nhập dữ liệu nguồn: Tìm theo utility, CSS property hoặc khái niệm như spacing, grid, typography, color hay state.

  2. Chọn thiết lập phù hợp: Lọc category rồi đọc class-to-CSS; đặt responsive breakpoint, hover/focus và dark mode đúng ngữ cảnh.

  3. Kiểm tra và xác minh kết quả: Đối chiếu class với tài liệu của đúng Tailwind version và config dự án trước khi dùng production.

Khả năng chính

  • Tra cứu utility class bằng search.
  • Filter theo category.
  • Hiển thị class name và CSS tương ứng.
  • Giải thích responsive/state khi dataset có.
  • Bắt buộc có version/update metadata.

Trường hợp nên dùng

  • Nhớ nhanh tên utility khi code.
  • Từ một CSS declaration tìm utility Tailwind phù hợp.
  • Đọc class lạ trong codebase cùng version.

Giới hạn và lưu ý an toàn

  • Cheat sheet tĩnh không thể bao phủ mọi plugin, arbitrary value, theme token hoặc custom config. CSS sinh ra có thể khác theo version. Con số 304 tại ngày audit không phải cam kết completeness.
  • Trang tra cứu này không cần secret của người dùng. Tuy vậy, từ khóa tìm kiếm cũng không nên gửi cho bên thứ ba nếu chưa thông báo.

Khắc phục sự cố

Class không chạy

kiểm tra Tailwind version, content scanning/build và theme.

CSS khác bảng

đối chiếu v3/v4, custom token, plugin và arbitrary value.

Search không thấy

bổ sung alias/CSS property nhưng không gọi dataset là complete nếu chưa test.

Câu hỏi thường gặp

Cheat sheet này dùng Tailwind phiên bản nào?

Bản build này dùng Tailwind CSS 4.3.3. Cheatsheet là tài liệu tra cứu có tìm kiếm; hãy đối chiếu utility phụ thuộc phiên bản với bản Tailwind trong dự án của bạn.

Danh sách class có đầy đủ không?

Không nên claim đầy đủ chỉ từ số lượng audit. Tailwind còn arbitrary value, config, variants và plugin.

Có thể copy CSS hiển thị trực tiếp không?

Hãy coi đây là giải thích utility; output build chính xác còn phụ thuộc version và config dự án.

Công cụ có an toàn và riêng tư không?

Trả lời ngắn gọn: Trang tra cứu này không cần secret của người dùng. Tuy vậy, từ khóa tìm kiếm cũng không nên gửi cho bên thứ ba nếu chưa thông báo.

Công cụ có dùng được trên điện thoại không?

Bố cục thích ứng với màn hình hẹp. Việc chọn tệp, dùng camera, thao tác clipboard và tải xuống vẫn phụ thuộc quyền cùng khả năng của trình duyệt di động.

Bắt đầu sử dụng

Tìm class, xem ý nghĩa CSS rồi xác nhận trong tài liệu đúng version/config của dự án.