Frequently Asked Questions

Find answers to common questions about Tailwind's installation, configuration, and usage patterns.

Common Questions

Getting Started

How do I install Tailwind CSS?

Install via npm with npm install tailwindcss, or include the CDN in your HTML.

What's the difference between CDN and PostCSS?

The CDN is for quick prototyping, while PostCSS allows full customization and optimization.

How do I purge unused styles?

Use the purge option in your tailwind.config.js file with a content glob pattern.

Configuration

How do I change the default theme?

Modify the theme object in your tailwind.config.js file to customize colors, fonts, and spacing.

Can I create custom variants?

Yes - define your own hover, focus, or responsive variants in the variants section of your config.

How do I extend utilities?

Use the extend property to add custom values to existing utility scales like spacing or colors.

Advanced Usage

How do plugins work?

Plugins add new utilities, directives, or components to Tailwind. Install and configure through the plugins array.

What is JIT mode?

Just-in-Time compilation builds only the CSS you need on demand, improving build times and reducing file size.

Can I use it with React?

Absolutely! Tailwind works seamlessly with React, Vue, Angular, and any JavaScript framework.

Need More Help?

Join Our Community

Get help from thousands of developers in our Discord channel or Stack Overflow community.

Join Discord

Contribute to the Docs

Found a bug or have improvements? Help make this documentation better by submitting a PR on GitHub.

View on GitHub