Quickly style elements with Tailwind's comprehensive utility classes.
Use
text-{color}-{shade}:
text-indigo-600
Primary text
text-gray-500
Secondary text
text-green-600
Success text
text-red-600
Danger text
text-amber-500
Warning text
text-sky-500
Info text
text-gray-400
Muted text
text-gray-900
Dark text
Use
bg-{color}-{shade}:
bg-indigo-500
bg-gray-500
bg-green-500
bg-red-500
bg-amber-400
bg-sky-400
bg-gray-100
bg-gray-900
text-white on dark
backgrounds and
text-gray-900 on light
backgrounds to ensure readability.
Shorthand:
{property}{sides}-{size}
p = Paddingm = Margint = topb = bottoml = leftr = rightx = left + righty = top + bottomp-0
p-1 (4px)
p-2 (8px)
p-4 (16px)
p-6 (24px)
p-8 (32px)
block
Full width blockinline-block
Inline Blockhidden
You can't see me! (hidden element)flex
grid grid-cols-3
md:hidden
Mobile only Desktop onlyborder
border-2 border-indigo-500
border-4 border-indigo-500
rounded
rounded-xl
rounded-full
shadow-sm
shadow
shadow-md
shadow-lg
shadow-xl
shadow-2xl