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