SDK JS
    Preparing search index...
    • Choose the widget palette: 'dark' (the default), 'light', or 'auto' to follow the operating system's prefers-color-scheme.

      Parameters

      Returns void

      Takes effect immediately on widgets already on the page — it sets one attribute on the document element and the colours are custom properties, so nothing is rebuilt.

      The default is 'dark', not 'auto', on purpose. These panels sit over a basemap, and the right palette follows the MAP rather than the OS: light panels over dark satellite imagery read worse than dark panels on a light-mode desktop. Pick to match your basemap; 'auto' is there for an app whose basemap already follows the system.

      setWidgetTheme('light'); // to match a light basemap