T
برگه تقلب
Tailwind
▶
پیشنمایش زنده — کلاسها را تایپ کن و نتیجه را ببین
دکمه
کارت
عنوان
انیمیشن
ترنسفورم
پیشنمایش
۱
چیدمان (Layout)
Container
container
Box sizing
box-border
box-content
Display
block
inline-block
inline
flex
inline-flex
grid
hidden
Position
static
relative
absolute
fixed
sticky
Inset
inset-0
top-0
bottom-4
right-2
left-1/2
Z-index
z-0
z-10
z-50
-z-10
Overflow
overflow-hidden
overflow-auto
overflow-y-scroll
Width
w-1/2
w-full
w-screen
w-fit
Height
h-1/2
h-full
h-screen
h-fit
Max/Min
max-w-xs
max-w-2xl
max-w-full
min-h-screen
۲
فاصلهگذاری (Spacing)
Padding
p-4
px-4
py-4
pt-4
pe-4
pb-4
ps-4
Margin
m-4
mx-4
my-4
mt-4
me-4
mb-4
ms-4
mx-auto
Space between
space-x-4
space-y-4
space-y-reverse
Negative margin
-mt-4
-mx-2
مقیاس فاصله: 0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32... (هر واحد = 0.25rem)
۳
تایپوگرافی (Typography)
Font family
font-sans
font-serif
font-mono
Font size
text-xs
text-sm
text-base
text-lg
text-2xl
text-4xl
text-6xl
Font weight
font-light
font-normal
font-medium
font-semibold
font-bold
font-extrabold
Text color
text-gray-500
text-white
text-blue-400
Text align
text-left
text-center
text-right
text-justify
Line height
leading-none
leading-tight
leading-normal
leading-loose
Letter spacing
tracking-tighter
tracking-tight
tracking-wide
tracking-widest
Transform
uppercase
lowercase
capitalize
Decoration
underline
line-through
no-underline
decoration-dotted
Overflow
truncate
text-ellipsis
whitespace-nowrap
break-words
۴
رنگها (Colors)
پالت کامل (هر رنگ سایه ۵۰ تا ۹۵۰ دارد)
متن
text-{color}-{shade}
پسزمینه
bg-{color}-{shade}
حاشیه
border-{color}-{shade}
شفافیت رنگ
bg-blue-500/50
text-white/80
۵
حاشیه و گوشه (Borders & Radius)
عرض حاشیه
border
border-2
border-4
border-t-2
border-x-2
سبک حاشیه
border-solid
border-dashed
border-dotted
گردی گوشه
rounded
rounded-sm
rounded-md
rounded-lg
rounded-xl
rounded-2xl
rounded-full
نمونه گردی گوشه
none
sm
md
lg
xl
full
۶
پسزمینه (Background)
رنگ
bg-blue-900
گرادینت
bg-gradient-to-r
from-blue-500
via-purple-500
to-pink-500
اندازه
bg-cover
bg-contain
bg-auto
موقعیت
bg-center
bg-top
bg-bottom
تکرار
bg-no-repeat
bg-repeat
bg-repeat-x
چسبندگی
bg-fixed
bg-local
bg-scroll
۷
فلکس و گرید (Flexbox & Grid)
Flexbox
flex
flex-1
flex-row
flex-col
flex-wrap
justify-start
justify-center
justify-between
items-center
items-stretch
gap-4
Grid
grid
grid-cols-1
grid-cols-3
grid-cols-12
col-span-2
row-span-2
gap-4
gap-x-4
gap-y-4
place-items-center
۸
سایهها (Shadows)
shadow-sm
shadow
shadow-md
shadow-lg
shadow-xl
shadow-2xl
shadow-sky-500/50
shadow-none
۹
افکتها و ترنسفورم (Effects & Transforms)
شفافیت
opacity-0
opacity-50
opacity-100
فیلتر
blur-sm
brightness-110
contrast-125
grayscale
Backdrop
backdrop-blur
backdrop-brightness-110
ترانزیشن
transition
duration-150
ease-in-out
delay-100
اسکیل و چرخش
scale-95
scale-110
rotate-6
-rotate-12
skew-x-6
جابهجایی
translate-x-2
-translate-y-1
انیمیشن
animate-spin
animate-ping
animate-pulse
animate-bounce
نشانگر
cursor-pointer
cursor-not-allowed
select-none
۱۰
نقاط شکست ریسپانسیو (Breakpoints)
پیشوند نقطه شکست را قبل از کلاس اضافه کن تا فقط از آن عرض به بعد اعمال شود (mobile-first).
sm
≥ 640px
md
≥ 768px
lg
≥ 1024px
xl
≥ 1280px
2xl
≥ 1536px
مثال:
md:text-lg
lg:p-8
xl:flex
۱۱
حالتهای تعاملی (Interactive States)
Hover
hover:bg-blue-600
Focus
focus:outline-none
focus:ring-2
focus-visible:ring-2
Active
active:scale-95
Disabled
disabled:opacity-50
disabled:cursor-not-allowed
Group / Peer
group-hover:text-white
peer-checked:bg-sky-500
Dark mode
dark:bg-slate-900
dark:text-white
First/Last/Odd
first:mt-0
last:mb-0
odd:bg-slate-800
۱۲
مثالهای کاربردی (Common Examples)
دکمه اصلی
دکمه نمونه
bg-sky-600 hover:bg-sky-500 active:scale-95 text-white font-medium py-2 px-4 rounded-lg transition
ورودی فرم
border border-slate-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-sky-500 w-full bg-slate-900
برچسب وضعیت
فعال
bg-emerald-500/15 text-emerald-400 text-xs font-medium px-2.5 py-1 rounded-full
کپی شد!