Most Used CSS Properties

Tailwind CSS: Layout & Display Utilities

container

Centers and sets max-width for responsive layout.

box-border

Sets box-sizing to border-box.

block

Displays element as block.

inline-block

Displays element as inline-block.

inline

Displays element inline.

flex

Enables flexbox layout.

inline-flex

Enables inline flexbox layout.

grid

Enables CSS grid layout.

hidden

Hides the element.

visible

Makes a hidden element visible.


Check out our interesting practice projects using tailwind here

Tailwind Projects

Spacing Utilities

m-4

Applies margin of 1rem (16px) on all sides.

mt-6

Applies margin-top of 1.5rem (24px).

mr-2

Applies margin-right of 0.5rem (8px).

mb-8

Applies margin-bottom of 2rem (32px).

ml-1

Applies margin-left of 0.25rem (4px).

p-4

Applies padding of 1rem (16px) on all sides.

pt-3

Applies padding-top of 0.75rem (12px).

pr-5

Applies padding-right of 1.25rem (20px).

pb-2

Applies padding-bottom of 0.5rem (8px).

pl-6

Applies padding-left of 1.5rem (24px).

space-x-4

Adds horizontal spacing of 1rem (16px) between flex/grid children.

space-y-2

Adds vertical spacing of 0.5rem (8px) between flex/grid children.

Typography category — common Tailwind CSS classes for text styling

text-xs

Extra small text size (0.75rem / 12px).

text-sm

Small text size (0.875rem / 14px).

text-base

Base/normal text size (1rem / 16px).

text-lg

Large text size (1.125rem / 18px).

text-xl

Extra large text size (1.25rem / 20px).

font-thin

Thin font weight.

font-light

Light font weight.

font-normal

Normal font weight.

font-semibold

Semi-bold font weight.

font-bold

Bold font weight.

italic

Makes text italic.

not-italic

Resets italic style to normal.

uppercase

Transforms text to uppercase.

lowercase

Transforms text to lowercase.

capitalize

Capitalizes first letter of each word.

tracking-wide

Increases letter spacing.

tracking-tight

Decreases letter spacing.

leading-tight

Sets tight line height.

leading-loose

Sets loose line height.

Colors category — Tailwind CSS classes for background, text, and border colors

bg-red-500

Sets background color to red at 500 intensity.

bg-green-400

Sets background color to green at 400 intensity.

bg-blue-600

Sets background color to blue at 600 intensity.

text-red-700

Sets text color to red at 700 intensity.

text-gray-900

Sets text color to dark gray (900).

text-white

Sets text color to white.

border-red-300

Sets border color to red at 300 intensity.

border-gray-200

Sets border color to light gray (200).

bg-opacity-50

Sets background opacity to 50%.

text-opacity-75

Sets text opacity to 75%.

Flexbox category — essential Tailwind CSS flexbox utilities

flex

Enables flexbox layout.

inline-flex

Enables inline flexbox layout.

flex-row

Arranges flex items in a row (default).

flex-col

Arranges flex items in a column.

flex-wrap

Allows flex items to wrap to the next line.

flex-nowrap

Prevents flex items from wrapping (default).

justify-start

Aligns flex items to the start horizontally.

justify-center

Centers flex items horizontally.

justify-end

Aligns flex items to the end horizontally.

items-start

Aligns flex items to the start vertically.

items-center

Centers flex items vertically.

items-end

Aligns flex items to the end vertically.

Grid category — Tailwind CSS grid utilities

grid

Enables CSS grid layout.

grid-cols-2

Creates a grid with 2 equal columns.

grid-cols-3

Creates a grid with 3 equal columns.

grid-cols-4

Creates a grid with 4 equal columns.

col-span-2

Makes an element span 2 columns.

row-span-2

Makes an element span 2 rows.

gap-4

Sets gap between grid items to 1rem (16px).

gap-x-6

Sets horizontal gap between grid items to 1.5rem (24px).

gap-y-2

Sets vertical gap between grid items to 0.5rem (8px).

auto-cols-auto

Grid auto columns size based on content.

20 Tailwind CSS utility classes from Positioning and Sizing

static

Default position (static).

relative

Position element relative to its normal position.

absolute

Position element absolutely within nearest positioned ancestor.

fixed

Fix element relative to the viewport.

top-0

Sets top position to 0.

right-0

Sets right position to 0.

bottom-0

Sets bottom position to 0.

left-0

Sets left position to 0.

w-full

Sets width to 100%.

w-1/2

Sets width to 50%.

w-24

Sets width to 6rem (96px).

h-full

Sets height to 100%.

h-12

Sets height to 3rem (48px).

min-w-full

Sets minimum width to 100%.

max-w-sm

Sets max width to small (24rem / 384px).

max-h-screen

Sets max height to 100vh (viewport height).

overflow-auto

Shows scrollbars automatically if content overflows.

overflow-hidden

Hides overflowing content.

z-10

Sets z-index to 10.

z-50

Sets z-index to 50 (higher stack).


Check out our interesting practice projects using tailwind here

Tailwind Projects

Borders and Shadows

border

Adds 1px solid border with default color.

border-2

Sets border width to 2px.

border-4

Sets border width to 4px.

border-t

Applies border only on top side.

border-b

Applies border only on bottom side.

border-l

Applies border only on left side.

border-r

Applies border only on right side.

rounded

Applies small border-radius (default 0.25rem).

rounded-md

Medium border-radius (0.375rem).

rounded-lg

Large border-radius (0.5rem).

rounded-full

Full circle border radius (makes element circular).

shadow

Applies small box-shadow.

shadow-md

Applies medium box-shadow.

shadow-lg

Applies large box-shadow.

shadow-xl

Applies extra-large box-shadow.

shadow-2xl

Applies very large box-shadow.

shadow-inner

Applies inset shadow inside the element.

border-transparent

Makes border color transparent.

border-gray-300

Border color gray (300 intensity).

border-red-500

Border color red (500 intensity).