How to change dynamically tailwind.config.js file color ? #12647
Answered
by
wongjn
tasnimultas67
asked this question in
Help
-
Hello there, I want when the user selects the color code, that color code will be dynamically replaced in the color section of the config file and the color of the full website will be changed. I can only get the color code in the console but can't set it dynamically in the config file. I am building a website with React.js |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Dec 24, 2023
Replies: 2 comments 1 reply
-
You could consider having the color in the Tailwind configuration as a CSS variable and then set the value of this CSS variable at runtime in the website. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tasnimultas67
-
It is possible to set with variable the full palette, like this, but with css variables?:
|
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
You could consider having the color in the Tailwind configuration as a CSS variable and then set the value of this CSS variable at runtime in the website.