I'm struggling for a while with this problem .
In my company, we are starting a new multi-tenant react SPA application where every tenant corresponds to a different client.
Clients based on contracts could have customization , from a logo or colors to (rarely) a custom styled components, like for example a custom header with a different element position, a background image instead of a color and so on.
What could be the best solution to do this ?
I have been thinking these solutions, but I really don't know if are correct or not:
Thank you
I've developed a solutions last year which did not cover all the requirements in OP's post but users/tenants can set color based themes using Ant Design (React Component's Library). Here is demo where you can set theme variables https://antd-live-theme.firebaseapp.com/ which is based on following package
https://github.com/mzohaibqc/antd-theme-webpack-plugin
If you can't use Ant Design due to some reason then there is another package which allows you to process css files and create a color.less file containing only those css rules which are related to colors like background color, color etc. which can be imported in index.html and now you can change those color variables using some UI (using api less.modifyVars())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With