A
AiTechWorlds
AiTechWorlds

<!-- Padding: p-{n} where n ร 4 = px -->
p-0 โ 0px p-1 โ 4px p-2 โ 8px
p-3 โ 12px p-4 โ 16px p-5 โ 20px
p-6 โ 24px p-8 โ 32px p-10 โ 40px
p-12 โ 48px p-16 โ 64px p-20 โ 80px
px-4 โ padding left + right: 16px
py-4 โ padding top + bottom: 16px
pt-4 โ padding-top: 16px
pb-4 โ padding-bottom: 16px
pl-4 โ padding-left: 16px
pr-4 โ padding-right: 16px
<!-- Margin (same pattern) -->
m-4 โ margin: 16px
mx-auto โ center horizontally
mt-8 โ margin-top: 32px
-mt-4 โ margin-top: -16px (negative margin)<!-- Font Size -->
text-xs โ 12px text-sm โ 14px
text-base โ 16px text-lg โ 18px
text-xl โ 20px text-2xl โ 24px
text-3xl โ 30px text-4xl โ 36px
text-5xl โ 48px text-6xl โ 60px
<!-- Font Weight -->
font-thin โ 100 font-light โ 300
font-normal โ 400 font-medium โ 500
font-semibold โ 600 font-bold โ 700
font-extrabold โ 800 font-black โ 900
<!-- Text Alignment -->
text-left text-center text-right text-justify
<!-- Line Height -->
leading-none โ 1 leading-tight โ 1.25
leading-normal โ 1.5 leading-relaxed โ 1.625
leading-loose โ 2
<!-- Other -->
tracking-tight โ letter-spacing: -0.05em
tracking-wide โ letter-spacing: 0.025em
tracking-wider โ letter-spacing: 0.05em
uppercase lowercase capitalize normal-case
line-clamp-1 line-clamp-2 line-clamp-3<!-- Common color patterns -->
bg-white bg-black bg-transparent
bg-gray-50 ... bg-gray-900
bg-blue-500 bg-red-500 bg-green-500
bg-yellow-400 bg-purple-600 bg-pink-500
text-white text-black
text-gray-400 text-gray-700 text-gray-900
border-gray-200 border-blue-500
<!-- With opacity (Tailwind v3+) -->
bg-blue-500/50 โ background: rgba(blue, 0.5)
text-black/80 โ color: rgba(0,0,0,0.8)
border-white/20 โ border: rgba(255,255,255,0.2)flex inline-flex
flex-row flex-col flex-row-reverse flex-col-reverse
justify-start justify-end justify-center
justify-between justify-around justify-evenly
items-start items-end items-center
items-baseline items-stretch
self-start self-center self-end
flex-1 โ flex: 1 1 0%
flex-auto โ flex: 1 1 auto
flex-none โ flex: none
flex-wrap flex-nowrap
flex-shrink-0 flex-grow
gap-4 gap-x-4 gap-y-4grid display: grid
grid-cols-1 ... grid-cols-12
grid-cols-none
col-span-1 ... col-span-12
col-span-full
col-start-1 col-end-3
grid-rows-1 ... grid-rows-6
row-span-2
row-start-1 row-end-3
auto-cols-auto auto-rows-auto
auto-rows-fr auto-rows-min<!-- Width -->
w-0 w-px w-0.5 w-1 w-2 w-4 w-8
w-16 w-32 w-48 w-64 w-80 w-96
w-auto w-full w-screen
w-1/2 w-1/3 w-2/3 w-1/4 w-3/4
max-w-xs โ 320px max-w-sm โ 384px
max-w-md โ 448px max-w-lg โ 512px
max-w-xl โ 576px max-w-2xl โ 672px
max-w-3xl โ 768px max-w-4xl โ 896px
max-w-5xl โ 1024px max-w-6xl โ 1152px
max-w-7xl โ 1280px max-w-full โ 100%
<!-- Height (same pattern) -->
h-4 h-8 h-16 h-32 h-64
h-full h-screen h-auto
min-h-screen min-h-full<!-- Border -->
border โ 1px solid
border-2 โ 2px solid
border-0 โ no border
border-t border-r border-b border-l
<!-- Border Radius -->
rounded-none โ 0
rounded-sm โ 2px
rounded โ 4px
rounded-md โ 6px
rounded-lg โ 8px
rounded-xl โ 12px
rounded-2xl โ 16px
rounded-3xl โ 24px
rounded-full โ 9999px (pill / circle)
rounded-t-xl โ top corners only
rounded-l-xl โ left corners only<!-- Shadow -->
shadow-sm shadow shadow-md
shadow-lg shadow-xl shadow-2xl
shadow-none shadow-inner
<!-- Opacity -->
opacity-0 opacity-25 opacity-50
opacity-75 opacity-100
<!-- Blur -->
blur-none blur-sm blur blur-md blur-lg blur-xl
<!-- Background blur -->
backdrop-blur-sm backdrop-blur backdrop-blur-mdstatic relative absolute fixed sticky
top-0 right-0 bottom-0 left-0
inset-0 โ all sides 0
z-0 z-10 z-20 z-30 z-40 z-50 z-auto
overflow-hidden overflow-scroll overflow-auto overflow-visible
block inline-block inline hidden flex gridsm: โ min-width: 640px
md: โ min-width: 768px
lg: โ min-width: 1024px
xl: โ min-width: 1280px
2xl: โ min-width: 1536px
<!-- Examples -->
<div class="w-full md:w-1/2 lg:w-1/3">...</div>
<p class="text-sm lg:text-base">Text</p>
<div class="flex-col md:flex-row gap-4">...</div>
<nav class="hidden lg:flex">Desktop Nav</nav>hover:bg-blue-600 โ on hover
focus:ring-2 โ on focus
focus:outline-none โ remove focus outline
active:scale-95 โ on click
disabled:opacity-50 โ when disabled
dark:bg-gray-900 โ dark mode
group-hover:text-blue โ when parent .group hovered
<!-- Transitions -->
transition all 150ms ease
transition-colors color, bg, border
transition-transform transform
duration-150 duration-200 duration-300
ease-in ease-out ease-in-out
<!-- Transform -->
scale-95 scale-100 scale-105
translate-x-4 translate-y-2
rotate-45 rotate-90Get more notes like this daily on Telegram!
Free study notes, cheat sheets & AI tips
Last reviewed on June 13, 2026 by the AiTechWorlds Notes Team. Free cheat sheet no signup required.
Join AiTechWorlds on Telegram and get daily AI tips, prompt engineering templates, coding resources, and exclusive content 100% free!
No spam. Leave anytime.