Skip to content

Hotwire Theme Mode (<hotwire-theme-mode>)

The <hotwire-theme-mode> component synchronizes the web application's theme (Dark/Light) with the Native App's UI.

Example

html
<hotwire-theme-mode 
  style="display:none;">
</hotwire-theme-mode>

Ready Event

Event NameFrequency
bagisto-native:theme-mode-readyDispatched once the component connects and is ready.

Functionality

When the web app switches to Dark Mode, it updates this component, which triggers a message to the native app to darken the native navigation bar, status bar, and bottom tabs.

Attributes

AttributeValuesDescription
data-bridge-modelight | darkThe current theme mode.

Next Steps

Released under the MIT License.