How to allow the user to change the style theme?

0
What is the best way to implement switchable themes in Mendix? For example, “bright theme” and ”dark theme”, the user should be able to switch styles for the app, and his choice should be stored so that he would see the same theme next time he logs in. I use SCSS to style the app,so I could create a couple of styling versions, but how can Iimplement logic for switching between them?
asked
4 answers
0

This widget may be of use to you. https://appstore.home.mendix.com/link/app/109716/

answered
0

I have personally used this one: works like a charm. https://appstore.home.mendix.com/link/app/106033/

answered
0

Use the javascript button, set the following javascript: 

document.getElementById("content").classList.toggle("dark-theme")

 

Make two sets of colorpalets:

#content{

--background-color: #fff;

--font-color: #000;

}

And

#content .black-theme{

--background-color: #000;

--font-color: #fff;

}

 

Then create your buildingblocks and refer to de variables you've set:

.buildingblock{

background-color: var(--background-color);

font-color: var(--font-color)

}

answered
0

Check this blog post: https://www.notion.so/gajduk/How-to-add-a-dark-theme-to-your-Mendix-app-in-5-minutes-27ea7559165b46e3a3aac2f19cef8836

 

answered