The Sidebar Theme Toggle is an official Discourse theme component that adds a theme selector to the sidebar footer, allowing users to switch between user-selectable themes. It functions for both logged-in and anonymous users and is designed to be included in all user-selectable themes.
Initial discussions highlighted mobile compatibility issues, particularly on iOS devices where the footer was sometimes cut off, and general installation problems where the toggle did not appear. The Discourse team advised that these issues were often resolved by rebuilding the Discourse instance and ensuring the software was up to date. awesomerobot noted the mobile footer issue, while MarcP suggested rebuilding the instance as a fix. stuwest and davidkingham reported difficulties getting the component to work, which were later resolved by dax pointing out that themes must be explicitly configured as “selectable by users” in their settings. alltiagocom confirmed this was the missing step.
Feature requests included adding dark/light/auto selectors, color palettes, and a simple toggle button for two-theme setups. AquaL1te asked about dark theme selection, while abe suggested a toggle-only mode for binary choices like dark/bright. merefield suggested creating separate themes for different color palettes. nwnuyhs expressed approval of the component.
Anomalous behavior was observed on Meta Discourse regarding the “Hidden Whispers” theme, which only appeared under specific conditions. awesomerobot clarified this was intentional for staff screenshots and fixed the visibility for non-staff users. one1 questioned the behavior of palette toggles on Meta versus other sites, noting discrepancies in how palettes are displayed and managed within themes like Horizon.
Sidebar Theme Toggle adds a theme selector in the sidebar menu’s footer provided there is more than 1 user selectable theme. This selector works with both logged-on users and anonymous users. Be sure to add this to all your user-selectable themes for easy toggling.
We may do some additional work here in the future to make this a more comprehensive menu that allows users to choose colors, font-sizes, and theme from one menu — but for now this grants sites the same basic behavior as the Hamburger Theme Selector!
Name
Description
toggle icon
hide theme name
Hosted by us? Theme components are available to use on our Pro, Business, and Enterprise plans.
This is a great idea for a component, but I’m having a little difficulty getting it to work. I’ve installed it and included it in all my themes but the drop-down doesn’t appear. If I toggle the “hide theme name” setting, the keyboard shortcut icon moves from the left side of the sidebar footer to the right, but no theme selector.
Thanks Kris, unfortunately it’s not working on my site. Did a hard refresh of course, tried different themes that have no other components, don’t see anything relevant in the console or logs…
Weird thing on the Meta, the “Hidden Whispers” theme only appears when the current theme is “Central”, “Default (full-width)”, “Fully”, “Meta Branded”, or “redditish”. Example:
Not sure if it’s relevant, but I noticed while writing this that the themes where “Hidden Whispers” shows up are also the ones where the reply box covers up the theme toggle.
Hidden Whispers also doesn’t have a description in the theme category that I can find. This appears to be the only other mention of its existence? I feel like I’m losing my mind
edit: This might not be related to this theme-commponent, I see the same behavior in the profile > interface > theme menu.
That’s a theme that the staff uses in cases where they may be taking a screenshot of Meta or something similar and don’t want whispers to be included. We have a separate theme component meant to hide it from the themes list for normal non-staff accounts, but it wasn’t added everywhere.
I think it should be fixed now, it shouldn’t appear in the list for you while using any theme. Apologies for the confusion!