> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/studio-and-sitebuilder/using-sitebuilder/sitebuilder-javascript/dark-mode-js.md).

# Dark Mode JS

The dark\_mode script is based on Flowbite's own documentation for dark mode. See <https://flowbite.com/docs/customize/dark-mode/#dark-mode-switcher> . We include step 1 directly on your page template, as this needs to load immediately. Our JavaScript script implements step 3 from the documentation.

### Usually added to: <a href="#usually-added-to" id="usually-added-to"></a>

Flowbite Theme Templates

### Script code: <a href="#script-code" id="script-code"></a>

```liquid
<script async id="sitegurus_dark_mode_javascript_api" src="{{'modules/module_86/js/sitegurus_dark_mode_javascript_api.js' | asset_url}}" charset="utf-8"></script>
```
