Skip to content

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

@jorgefreires

Description

@jorgefreires

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions