Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Compose Tailwind Utilities with @apply


    The @apply directive lets you compose utility classes so you can re-use common styles and not litter your html with a ton of repetitive styles.

    Even when using @apply directives, it's still easy to start repeating yourself in your code. We'll use the multi-class component pattern to extract the common styles into a base class and then styling (e.g. color) can be additionally applied as another class.