docs icon indicating copy to clipboard operation
docs copied to clipboard

modeToggle config not respected — defaultMode ignored and dark mode still active

Open jorgefreires opened this issue 4 months ago • 2 comments

I'm trying to force the documentation site to always load in light mode and hide the dark/light mode toggle in my Mintlify project. According to the documentation, I'm using the following configuration in docs.json:

"modeToggle": {
  "default": "light",
  "isHidden": true
}

I also tried this variation:

"modeToggle": {
  "defaultMode": "light",
  "isHidden": true
}

However, after publishing, the site still shows the toggle, and the dark mode applies if it is the user's system default or was previously selected.

What I've already tried:

  • Verified docs.json syntax is correct.
  • Cleared browser cache.
  • Tested in incognito/private mode.
  • Published the site multiple times.

Expected behavior:

  • The documentation should always load in light mode.
  • The toggle to switch between dark/light mode should be hidden.

Actual behavior:

  • The defaultMode setting appears to be ignored.
  • The toggle is still visible.
  • Dark mode is applied when system preference is dark or was previously selected.

Any help would be appreciated. Thanks in advance!

jorgefreires avatar Jul 23 '25 09:07 jorgefreires