TwTailwind CSS · Lesson 5 of 8
Responsive Design & States
Tailwind uses a mobile-first approach. Classes apply at all sizes unless prefixed. `sm:text-xl` means "text-xl at 640px and above." Hover, focus, active — all controlled by state prefixes.
✦ Tip
Use `transition-{property}` and `duration-{ms}` to animate hover/focus state changes smoothly. `transition-colors` animates color/background, `transition-transform` animates scale/translate, `transition-all` animates everything (but is slower). `duration-200` is usually the sweet spot.
Use `transition-{property}` and `duration-{ms}` to animate hover/focus state changes smoothly. `transition-colors` animates color/background, `transition-transform` animates scale/translate, `transition-all` animates everything (but is slower). `duration-200` is usually the sweet spot.