Summary | Dark/Light Mode Toggle adds a clickable toggle color scheme button in the hamburger menu. The toggle switches between a light or dark color scheme for one theme. | |
Repository Link | https://github.com/discourse/discourse-color-scheme-toggle | |
New to Discourse Themes? | Beginner’s guide to using Discourse Themes |
Install this theme component
Features
This component allows a dark/light mode toggle icon on your Discourse forum. It will also automatically switch if you change your system OS to a mode other than your current color scheme.
You can choose to have the toggle display in the new Discourse Sidebar or in the header alongside other icons.
Sidebar
Header
Important Steps
For this to work properly, at least 2 color scheme choices need to be enabled in your /admin/customize/colors
area. At least two colors need to have color scheme can be selected by users
enabled.
A default color scheme needs to be set for dark mode: /admin/site_settings/category/basic?filter=dark
Once this is done, users should be able to choose between two color schemes as their light
and dark
preferences in their user preferences interface menu.
Settings
Name | Descriptions |
---|---|
svg icons | |
add color scheme toggle to header | Add color scheme toggle button to site header |
Translation | Default |
---|---|
toggle_button_title | Toggle color scheme |
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
Last edited by @JammyDodger 2024-06-12T07:42:19Z
Check document
Perform check on document: