Skip to main content

setThemeMode(mode)

Changes Command AI experiences to use the supplied theme mode ('light_mode', 'dark_mode', or 'auto')

Example

// using light_mode
window.CommandBar.setThemeMode("light_mode");

// using dark_mode
window.CommandBar.setThemeMode("dark_mode");

// using auto
window.CommandBar.setThemeMode("auto");

Method parameters

mode Required

'light_mode' | 'dark_mode' | 'auto'

Using 'light_mode' or 'dark_mode' will trigger the light / dark mode of your default Command AI theme. Using 'auto' will set light or dark mode according to each end user's system preferences. The default mode is 'light_mode'.