Relative Content

Tag Archive for cssreactjstailwind-css

Custom component coloring with Tailwind in React

I’m developing a component in React that accepts a color, a hex value as a string, and it should style various things inside my component, including states hover, before and after, focus, and in custom selectores as well.
In short, I need dynamic, arbitrary styling.
I’m well aware Tailwind does not support dynamic classes very well, but just so you know, if it did, some of my classes would look like: