What is Tailwind CSS

A utility-first CSS framework for rapidly building custom designs.


Tailwind

Tailwind CSS is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override.

Responsive to the core

Every Tailwind utility also comes with responsive variants, making it extremely easy to build responsive interfaces without resorting to custom CSS.

Tailwind uses an intuitive {screen}: prefix that makes it easy to notice responsive classes in your markup while keeping the original class name recognizable and intact.

Component-friendly

While you can do a lot with just utility classes, as a project grows it can be useful to codify common patterns into higher level abstractions.

Tailwind provides tools for extracting component classes from repeated utility patterns, making it easy to update multiple instances of a component from one place.

Designed to be customized

If it makes sense to be customizable, Tailwind lets you customize it. This includes colors, border sizes, font weights, spacing utilities, breakpoints, shadows, and tons more.

Tailwind is written in PostCSS and configured in JavaScript, which means you have the full power of a real programming language at your fingertips.

Tailwind is more than a CSS framework, it’s an engine for creating design systems.

A simple Tailwind CSS Component

Here is a small stats card sample code:

<div class="flex flex-wrap">
  <div class="w-full lg:w-6/12 xl:w-3/12 px-4">
    <div class="relative flex flex-col min-w-0 break-words bg-white rounded mb-6 xl:mb-0 shadow-lg">
      <div class="flex-auto p-4">
        <div class="flex flex-wrap">
          <div class="relative w-full pr-4 max-w-full flex-grow flex-1">
            <h5 class="text-blueGray-400 uppercase font-bold text-xs">
              Traffic
            </h5>
            <span class="font-semibold text-xl text-blueGray-700">
              350,897
            </span>
          </div>
          <div class="relative w-auto pl-4 flex-initial">
            <div class="text-white p-3 text-center inline-flex items-center justify-center w-12 h-12 shadow-lg rounded-full bg-red-500">
              <i class="far fa-chart-bar"></i>
            </div>
          </div>
        </div>
        <p class="text-sm text-blueGray-400 mt-4">
          <span class="text-emerald-500 mr-2">
            <i class="fas fa-arrow-up"></i> 3.48%
          </span>
          <span class="whitespace-no-wrap">
            Since last month
          </span>
        </p>
      </div>
    </div>
  </div>
</div>

Tutorials

Check out more on the official Tailwind CSS website.

Also, you can check out the official Tailwind CSS Tutorials.