Skip to main content
Use this event to programmatically control the appearance mode of your embedded Omni session and synchronize Omni’s color scheme with your parent application’s theme. This event is useful when:
  • You want to maintain visual consistency between your application and embedded Omni content
  • Your application has a theme switcher and you need embedded content to match the selected theme
  • You need to respond to system-level appearance changes and ensure embedded Omni follows suit
{
  "name": "appearance:mode",
  "payload": {
    "type": "dark" | "light" | "system"
  }
}

Properties

type
string
required
The appearance mode to apply. Accepts one of three values:
  • dark - Forces dark mode
  • light - Forces light mode
  • system - Uses the system’s preferred color scheme

Example

Switch an embedded Omni session to dark mode:
{
  "name": "appearance:mode",
  "payload": {
    "type": "dark"
  }
}