- XenForo Version
- XenForo 2.3.x
- Additional requirements
- XenForo 2.3.0+
PHP 8.0+
Unlike complex style switchers or heavy JavaScript solutions, [XTR] Day Night Mode is lightweight and smart. It respects the user's operating system preferences upon first visit and remembers their manual choice for future visits.
Key Features
- Native XF 2.3 Support: Built strictly on XenForo's new
style-variationarchitecture. No external libraries or complex JavaScript logic. - Smart Detection: On the first load (without cookies), the system automatically detects the user's OS preference (Dark/Light mode) via CSS
prefers-color-scheme. - Context-Aware Toggle:
- If the system/site is Dark, the button allows switching to Light.
- If the system/site is Light, the button allows switching to Dark.
- Customizable Icons: Choose from a variety of predefined FontAwesome icons (Sun, Moon, Star, Lightbulb, etc.) directly from the Admin Panel.
- Lightweight: Uses CSS for visibility logic, ensuring zero layout shift and blazing fast performance.
- Robust Implementation: Uses Regex-based template modifications to ensure compatibility even if your theme has minor whitespace changes.
You can easily configure the look and feel from Setup > Options > [XTR] Day Night Mode:
- Select specific icons for the Light Mode button via radio buttons.
- Select specific icons for the Dark Mode button via radio buttons.
- Global Forum Link
- https://xentr.net/