Skip to content
C Codeloom

Topics / Tailwind CSS

Tailwind CSS

Utility-first CSS. From basics to design system patterns.

Why learn Tailwind CSS?

  • No naming things, no jumping between files.

  • Design tokens (colors, spacing, type) are configured in one place.

  • JIT engine produces tiny CSS files in production.

  • Pairs perfectly with component frameworks like React and Astro.

What you can build with Tailwind CSS

App UIs and marketing sites Design systems with consistent tokens Quick prototypes that scale to production

Tailwind CSS tutorials

7 articles

Hand-written tutorials, ordered as a recommended learning path.

  1. 01 What Is Tailwind? An honest introduction to Tailwind CSS — what utility-first means, the design-token system, the JIT engine, the ugly-HTML tradeoff, and when component CSS is still better.
  2. 02 Install & Setup A practical walkthrough of installing Tailwind CSS v4 in a new project — the npm package, the @import directive, content sources, and quick integration notes for Vite and Astro.
  3. 03 Layout Utilities A practical tour of Tailwind's layout utilities — flex and grid, alignment, gap, padding and margin, width and height, and responsive prefixes — built around a real card layout example.
  4. 04 Colors & Themes How to work with Tailwind's color palette — opacity modifiers, arbitrary values, CSS variables for theming, the dark: variant, and configuring tokens with @theme in Tailwind v4.
  5. 05 Component Patterns Practical patterns for building reusable buttons, cards, and form controls in Tailwind — including variants, the @apply debate, and when to extract a component.
  6. 06 Dark mode Set up dark mode in Tailwind with the class strategy, persist the choice in localStorage, and avoid the flash of wrong theme on first paint.
  7. 07 Design tokens Design tokens give your Tailwind project a single source of truth. Learn how to model colors, spacing, and typography for multiple brands and themes.