Last updated on March 19, 2026

Margin

Edit

Usage

Please refer to the documentation on the Tailwind CSS website

Compatibility

ClassSupport
m-{n}
✅ Supported
m-[n]
✅ Supported
mx-{n}
✅ Supported
mx-[n]
✅ Supported
my-{n}
✅ Supported
my-[n]
✅ Supported
mt-{n}
✅ Supported
mt-[n]
✅ Supported
mr-{n}
✅ Supported
mr-[n]
✅ Supported
mb-{n}
✅ Supported
mb-[n]
✅ Supported
ml-{n}
✅ Supported
ml-[n]
✅ Supported
m-auto
✅ Supported
mx-auto
✅ Supported
my-auto
✅ Supported
mt-auto
✅ Supported
mr-auto
✅ Supported
mb-auto
✅ Supported
ml-auto
✅ Supported
Legend

Class

-{n} Supports values from theme

-[n] Supports arbitrary values

Icon

✅ Supported

✔️ Partial support on native

🧪 Experimental support on native

📱 Native only

🌐 Web only

On this page