search ESC

Spacing Utilities

Margin, padding, gap, space-between, and divide utilities. Scale: 0 (0) → 8 (64px). Directions: t / r / b / l / x / y.

Padding — all sides
p-0 p-1 p-2 p-3 p-4 p-5 p-6
Padding — directional
pt-4 pr-4 pb-4 pl-4 px-4 py-4
Margin — all sides
m-0
m-2
m-4
m-6

The dashed frames reveal the margin space around each box.

Margin — directional & auto
mt-5 (24px top)
mx-auto
Gap (flex / grid)

Use .lp-gap-{n} on a flex or grid container.

gap-2 (8px)

1234

gap-4 (16px)

1234

gap-6 (32px)

1234
Space between siblings

Add .lp-space-x-{n} / .lp-space-y-{n} to a parent; spacing is applied between siblings (not before the first child).

ABCD

space-x-3

Row 1
Row 2
Row 3
Divide — borders between siblings
First Second Third

divide-x (1px)

Row one
Row two
Row three

divide-y

CSS Reference
ClassDescription
.lp-m-{0..8}Margin all sides
.lp-mt/mr/mb/ml-{0..8}Directional margin
.lp-mx-{0..8} / .lp-my-{0..8}Horizontal / vertical margin
.lp-m-auto / .lp-mx-autoAuto margin (centering)
.lp-p-{0..8}Padding all sides
.lp-pt/pr/pb/pl-{0..8}Directional padding
.lp-px-{0..8} / .lp-py-{0..8}Horizontal / vertical padding
.lp-gap-{0..8}Flex / grid gap
.lp-gap-x-{0..8} / .lp-gap-y-{0..8}Axis-specific gap
.lp-space-x-{0..8} / .lp-space-y-{0..8}Margin between siblings
.lp-divide-x / .lp-divide-yBorder between siblings
.lp-divide-x-{0,2,4}Divide width variants
.lp-divide-{color}Divide color (primary, success, danger, etc.)