Loading
Animated Background Stripes Effect 12 exercises
explainer

Leverage Tailwind's Plugin API for Opacity Modifier Support

Let's say that next we wanted to add support for opacity modifiers.

We want to support all of Tailwind's opacity values, such as 90%, 50%, 25%, 10, 5, etc. We could write all of these modifiers manually, like we did for --stripes-white and --stripes-reverse, but we need a little bit more power.

Loading explainer

Transcript

0:00 Let's say that next we wanted to add support for opacity modifiers. We want to support all of Tailwind's opacity values. We want an opacity 90 percent, opacity 50 percent, 25 percent, 10, 5, etc.

0:13 We could make all of these modifiers manually, like we did for stripes-white and stripes-reverse, but I think at this point, we need a little bit more power. We should consider using something like the Tailwind plugin API. You know what? Let's build a Tailwind plugin.