How To Handle Multiple Themes/Design Systems

I am creating an app that needs to have a dynamic theme based on which company is signed in. I know how to do the logic, but not sure how to efficiently change the theme.

I could put an if statement each time I assign a color, but that seems excessive.

What I would like to do is have things like bg-primary etc etc, and assign the brand’s color to that color variable.

Is there any way to do this? Or am I missing an easier way?

I think you might want to either store this in the DB as a value, and fetch it, or just store it as an object / JSON, and have a formula fetch the color based on an identifier of that company.

1 Like

Yeah, I was thinking of doing an old-reddit like approach, but am hoping there is an easier solution out there

You can store in db an object for all the color variables of a theme and bind the element colors to the fetched object’s variable

1 Like