Using Qlik Sense themes with nebula.js is easy. The basic idea is to get the theme, configure the theme to be loaded by nebula.js, and then tell nebula.js that's the theme you'd like to use. Let's take a look.
Loading a Qlik Sense Theme
There are 3 common scenarios here, either you load your theme locally into your project, you load your theme from Qlik Sense Enterprise, or you load your theme from Qlik Sense Enterprise Windows, or you load your theme from Qlik Sense Enterprise SaaS.
Loading your theme in your project is as simple as including it.
import myTheme from '{path-to-theme}/theme';
Loading your theme from Qlik Sense Enterprise Windows looks like this
You can configure nebula.js to load multiple themes.
Tell nebula.js what theme to use
And finally, you need to tell nebula.js what theme to use. That's done by setting the theme property in the context. You can do this either in the embed function, or change it any other time using the context function. This is what it looks like doing it in the embed function.
And that's it! Now your theme will be applied to your nebula.js visualizations. Custom visualizations will need to be configured to consume the theme. And there are some differences between themes applied in nebula.js and themes applied in Qlik Sense. For that information, and more, please visit Applying Themes with nebula.js