How to Create Transparent Text in TailwindCSS

You can apply different CSS Blend Modes options in TailwindCSS to get almost any effect you want. In TailwindCSS, there are different classes for each blend mode. In this example, you’ll see how to have transparent text over an image.

Transparent Text on an Image in TailwindCSS

You can apply the mix-blend-screen class in TailwindCSS to get the transparent text over an image. For this blend mode to work, you must provide a background color to the text element. Here is an example.

You can check the working example and also the output of the above code in the following screenshot.

transparent text on an image in tailwindcss

Conclusion

You can get transparent text over an image with the mix-blend-screen class in TailwindCSS. You must provide a background color to the text that you want to see transparently on the image. Read more about the mix-blend classes on Tailwind official docs.

Latest articles

Related articles