Recommended way to override primary color per tenant basis #3100
sakhmedbayev
started this conversation in
General
Replies: 1 comment
-
You could adapt the ideas in #1978, that is, use CSS variables. The technique boils down to doing 3 things:
Then, you would use This technique gets a little trickier if you want to support many hues of the primary color, or support transparency, or have both primary and secondary colors. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are building a multiple-tenant app using Next.js and Tailwindcss, where each tenant can adjust his/her app's theme, so they can change, for instance, a primary color. This color will be saved in the tenant's config.
Question: what would be a recommended way to accomplish something like this using tailwind?
We understand that we can make
primary-color
to work as a js variable, put it somewhere in the app's state, and then derive it from there, however, we wonder if there is a more efficient way to do this.Beta Was this translation helpful? Give feedback.
All reactions