Tailwind Utility Class Approach
Tailwind is built around utility classes that apply single-purpose styles directly in markup.
CoreConceptLab
30 Concepts Explained
Tailwind is built around utility classes that apply single-purpose styles directly in markup.
Adds utilities to truncate text after a fixed number of lines.
Background, text, and border color utilities.
Border width, color, and radius utilities.
Background color, gradient, and image utilities.
Tailwind breakpoints are mobile-first, scaling up from smaller to larger screens.
Provides better default styles for form elements.
Supports dark mode styling with class or media strategies.
Provides hover:, focus:, active:, visited: variants for interactive states.
Supports before: and after: pseudo-elements for styling content.
Utilities for CSS Grid including grid-cols, grid-rows, and gap.
Width, height, min/max utilities for element sizing.
Provides transition duration, delay, and timing utilities.
Includes animate-spin, animate-ping, animate-bounce, and animate-pulse.
Cursor style utilities like pointer, not-allowed, and wait.
Controls stacking order of elements.
Provides a responsive container class for centered layouts.
Tailwind can be customized via tailwind.config.js for themes, colors, and plugins.
Adds prose classes for styling rich text content.
Controls the aspect ratio of elements like images and videos.
Margin and padding utilities for consistent spacing.
Box shadow utilities for depth and emphasis.
Scale, rotate, translate, and skew utilities.
Controls transparency of elements.
Controls overflow behavior with auto, hidden, scroll, and visible.
Allows using custom values directly in class names with square brackets.
Provides responsive variants like sm:, md:, lg:, xl: for adaptive layouts.
Extend default theme values like colors, spacing, and typography.
Provides flex, justify, items, and gap utilities for flexible layouts.
Font size, weight, style, and alignment utilities.