Demo to preview the plugin:
Introduction
This is a simple plugin that allows you to detect the current users operating systems preferred color scheme (darkmode or lightmode).
You can then show the user the correct version of your bubble app using conditionals.
How to setup
- Add the Element to the Page
- Go to the Design tab in your Bubble editor.
- Search for the element called Detect Theme Preference.
- Drag this element anywhere on your page .
- Use the Exposed State to Detect User Theme
This Detect Theme Preference's is dark mode
This element exposes a boolean state:
It returns
yes
if the user's system prefers dark mode, and no
if it prefers light mode.Plugin Element Properties
Detect Theme Preference
Exposed states
Title | Description | Type |
Theme Preference | Returns the value “darkmode” or “lightmode” | Text |