huseyinfiliz/simple-dark-mode

A simple dark mode toggle for Flarum 2

Maintainers

Package info

github.com/huseyinfiliz/simple-dark-mode

Homepage

Forum

Language:TypeScript

Type:flarum-extension

pkg:composer/huseyinfiliz/simple-dark-mode

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0 2026-07-08 09:03 UTC

This package is auto-updated.

Last update: 2026-07-08 09:06:46 UTC


README

Simple Dark Mode

License Latest Stable Version Total Downloads

A simple dark mode toggle extension for Flarum 2.

Simple Dark Mode adds a quick theme toggle to your forum header, allowing users and guests to switch between light and dark mode without opening the full appearance settings.

Features

  • 🌙 Quick theme toggle: Adds a simple light/dark mode button to the forum header.
  • 👤 User preference support: Logged-in users keep their selected theme through Flarum preferences.
  • 👥 Guest support: Guest users can also switch themes, with their choice stored locally in the browser.
  • High contrast support: Preserves Flarum's high contrast modes when switching between light and dark.
  • ⚙️ Admin settings: Control header visibility and icon style.

Installation

composer require huseyinfiliz/simple-dark-mode:"*"
php flarum cache:clear

Then enable the extension from your admin panel.

Updating

composer update huseyinfiliz/simple-dark-mode:"*"
php flarum cache:clear

Removing

composer remove huseyinfiliz/simple-dark-mode
php flarum cache:clear

Notes

This extension is intentionally simple. It does not add a custom theme system; it uses Flarum's existing color scheme support and provides a faster way to switch between modes.

High contrast modes are preserved when toggling:

light     -> dark
dark      -> light
light-hc  -> dark-hc
dark-hc   -> light-hc

For guest users, the selected theme is stored in the browser. This means the preference may be cleared if the browser storage is cleared or when using private/incognito mode.

Links

If you liked this extension, don't forget to check out my other extensions too: huseyinfiliz.com/flarum

License

Released under the MIT License.