![]() |
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
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 currently color scheme.
Thanks to @pmusaraj for the latest refactor of this component.
Options
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 dark theme needs to be enabled at: /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.