Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
Modifiers allow you to only apply some specific Tailwind class if another condition happens.
One is hover: to apply a class only if you’re hovering the element with the mouse.
For example: hover:underline
The dark: modifier is super useful for applying dark mode.
You set any “base” class, for example bg-white, and then say dark:bg-black to “override” the first one in dark mode.
Modifiers are also super useful with responsive design, as you’ll see in the next lesson.