Skip to content
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

30 articles · page 1 of 2

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 Tokens & Theming Build a robust theming system using custom design tokens, CSS variables, theme extension, and multi-brand support in Tailwind CSS.
  8. 08 Responsive Patterns Master mobile-first breakpoints, container queries, responsive grids, and real-world layout patterns using Tailwind CSS utilities.
  9. 09 CSS Grid Layouts Build powerful grid layouts using Tailwind's grid utilities, auto-fill, auto-fit, spanning, subgrid patterns, and real-world layout examples.
  10. 10 Dark Mode Strategies Master dark mode in Tailwind CSS with class strategy, media strategy, custom toggles, CSS variable theming, and flash-free server-side approaches.
  11. 11 Forms & Inputs A complete guide to styling forms, text inputs, selects, checkboxes, radios, and validation states using Tailwind CSS utilities.
  12. 12 Performance Reduce your Tailwind CSS bundle size with content configuration, purging strategies, production builds, and measurable optimization techniques.
  13. 13 Plugins & Presets Learn to write custom Tailwind plugins, use presets for shared configurations, and extend Tailwind's utility system with your own design primitives.
  14. 14 React & Next.js Best practices for using Tailwind CSS in React and Next.js projects: component patterns, conditional classes, server components, and common pitfalls.
  15. 15 Custom Components Extract reusable components from Tailwind utility classes: @apply, component extraction patterns, the plugin API, design tokens, and strategies for maintaining consistency at scale.
  16. 16 Responsive Design Build responsive layouts with Tailwind CSS: mobile-first breakpoints, responsive utilities, container queries, and practical patterns for real-world responsive components.
  17. 17 Animation Animate hover states, page mounts, and component transitions with Tailwind's transition and animation utilities and a few custom keyframes.
  18. 18 Arbitrary How Tailwind's JIT engine generates classes on demand, when arbitrary values are the right tool, and how to keep your design system tidy.
  19. 19 Extraction When to keep utilities inline, when to extract a component, and how to use @apply, variants, and cva without painting yourself into a corner.
  20. 20 Custom Plugins Write your own Tailwind plugins to add utilities, components, and variants that match your design system without reaching for arbitrary values everywhere.