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.

Tagged:

Comments

  • edited October 13

    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:
      https://snippet.webix.com/6nex4t8e

    • 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).

  • edited October 13

    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.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!