Dark mode checker

Muhammad Salman

Last Update 2 years ago

Description:

Dark Mode Checker is a Bubble plugin that detects whether the user's device is currently in dark mode. It provides a simple action, checks_users_dark_mode_on, which updates the exposed state users_dark_mode_on with the current dark mode status (yes for dark mode enabled, no otherwise). This plugin is perfect for building apps that adapt to the user's theme preferences.

Instructions

  1. Add the Element: Drag and drop the Dark Mode Checker element onto your Bubble page.
  2. Trigger the Action: Use the checks_users_dark_mode_on action in your workflow to check the user's dark mode setting.
  3. Read the State: Access the exposed state users_dark_mode_on to get the result:
  4. yes: Dark mode is enabled.
  5. no: Dark mode is disabled.
  6. Optional Customization: Use the state value to adapt your app’s UI, such as toggling between light and dark themes dynamically.
  7. This plugin is easy to set up and seamlessly integrates into your app for a personalized user experience.

Was this article helpful?

0 out of 0 liked this article