Set light mode as default

Hi support team,

I have the Metronic VueJS theme. How can I set the light mode as the default value? Currently, it defaults to the dark mode (or system) for most users.

Thanks.

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)

Hi,

You can change a default theme mode in file public/index.html. Just update defaultThemeMode variable.

The default theme is "system" but you can set a "light" or "dark" theme.

var defaultThemeMode = "dark";

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Hi Lauris,

Unfortunately, that doesn't work. I had already changed it, but the theme always defaults to dark mode. Any ideas?

Thanks.

Can you try to delete kt_theme_mode_menu and kt_theme_mode_value from your local storage?

We store these variables to save theme mode, if on your computer these variables are already set to "dark" then the theme will be dark every time you open a page.

Regards,
Lauris Stepanovs,
Keenthemes Support Team

I tested using the incognito mode to imitate a new user who would not have any values saved. The site still defaults to the dark mode. I'm certain you could replicate this behavior. Any way to fix this?

Hi,

Also, to change a default theme mode, you need to update the general.mode property in the file src/core/config/DefaultLayoutConfig.ts.

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Deleted comment
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(