Skip to main content
Elements are the bridge between Chameleon Experiences and your product’s UI. They describe how to find a specific HTML element on the page using a combination of CSS selectors, attributes, and DOM path information. Elements are used by:
  • Steps — to position tooltips relative to an element, trigger on element visibility, or listen for clicks/hovers.
  • Tours — each step in a Tour can target one or more elements.
  • Tooltips — always anchored to a specific element.
  • Buttons — can trigger a click on a target element.
Elements are managed automatically by the Chameleon Builder when you visually select elements in your product. The API provides read access to inspect element configurations.

Schema

Example element JSON

How element selection works

Chameleon uses the use array to determine which attributes to combine when building the runtime selector. This enables resilient element targeting even when your UI changes:
  • selector only — When use includes selector, the raw CSS/JS selector is used directly. Best for stable, unique selectors like #my-button.
  • Combined attributes — When use includes multiple attributes (e.g., ["tag", "text", "attr_class"]), Chameleon combines them to build a more resilient selector that can tolerate minor DOM changes.
  • Shadow DOM — When your element is inside a Web Component’s shadow DOM, the shadow_selector provides the path within the shadow root.

Elements in context

Elements appear as embedded objects within other resources. They are not listed or retrieved independently — instead, they are included when you retrieve a Step or Tour with the appropriate expand parameter. For example, a Step’s trigger_element and position_element fields are Element objects:
See Steps for all element-related fields on a Step.