12. What next?
🐇 TL;DR
- We did it - we built a reusable multi-theme Tailwind CSS plugin 🎉
- You did it, and you have now acquired a new Tailwind superpower ⚡️⚡️
- What would you do next?
🧠 What would you do next?
Now that you understand the key moving parts of building multi-theme support in Tailwind CSS, you can probably see how the same approach could be extented further.
How about branching off colors and adding different rounded corners
, shadows
or font families
for each theme?
Our current plugin only supports working the colors
object, but I am usre you ca imagine how instead of passing just color objects, we could pass objects that extend/update multiple of Tailwind’s corePlugins
like borderRadius
, shadow
or fontFamily
…
The core concepts underlying that approach remain the same: define CSS variables holiding specific values at the root
scope, and redefine those variables within theme-specific scopes.
And the Tailwind CSS Plugin API gives you all the power you need to handle everything your mind can think of!
I hope you had fun!
I sincerely hope this workshop was both educative and entertaining for you.
I had a lot of fun preparing the materials for it, and I really hope you had a good time going through it with me.
I would love your feedback
I would love if you can take 2 minutes to fill up the workshop feedback form.
It helps me improve the content for my online course and workshops!
Fill the feedback survey →