How to programatically change webix theme?

Hi, how can I change the webix theme to Contrast theme programatically? I want to use Contrast theme as a dark mode.

Hello @Yryskul ,

Skin switching itself entails a few options and depends on your current environment:

  • if you are not using Webix Jet, you will need to dynamically reload the CSS files depending on the selected skin (replacing the current skin with a new one). This option in particular depends entirely on how the CSS files are loaded in your project. If they are simply connected via the link tag, you could try and do something like the following:
    Code Snippet

  • if you are using Webix Jet, skin switching is fairly straightforward, as the framework includes the Theme plugin, which lets you set up the whole process effortlessly (please refer to the linked article for more details).

Thanks @annazankevich. I am using Webix jet, as you said I applied the theme plugin. It worked, however, I use sidebar also, its style did not change.