Tailwind CSS Documentation

Learn how to build responsive, semantic, and maintainable websites with Tailwind's utility-first approach.

Getting Started

Installation


# Install with npm
npm install tailwindcss

# Configure with PostCSS
npx tailwindcss init

After installing, add your CSS file as the source in your PostCSS configuration.

Basic Configuration


module.exports = {
  content: [
    './src/**/*.{html,js}'
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Configuration

Content Paths

Tailwind uses content paths to scan for classes in your project. Update the array in tailwind.config.js to include all source files.

Theme Customization

Tailwind ships with a default theme configuration, but you can customize colors, fonts, spacing, and more in the theme object.

Responsive Design

Breakpoints

Tailwind provides responsive variants for all common breakpoints by default. Use the sm:, md:, and lg: prefixes.




Stay Updated

Get notifications about the latest stable release and breaking changes directly in your inbox.