The Themes API is accessible through the io.themes object.

See the JavaScript Themes example on GitHub.

Listing All Themes

To get a list of all available themes, use the list() method:

const allThemes = await io.themes.list();

Current Theme

To get the currently selected theme, use the getCurrent() method:

const currentTheme = await io.themes.getCurrent();

Selecting Themes

To select a theme, use the select() method:

const themeName = "dark";


Theme Events

To get notified when the theme changes, use the onChanged() method:

const handler = newTheme => console.log(;



For a complete list of the available Themes API methods and properties, see the Themes API Reference Documentation.