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:Documentation Index
Fetch the complete documentation index at: https://developers.chameleon.io/llms.txt
Use this file to discover all available pages before exploring further.
- 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
| Property | Type | Description |
|---|---|---|
id | ID | The Chameleon ID |
created_at | timestamp | When this happened or when this was added to the Database |
updated_at | timestamp | The last time any property was updated |
selector | string | The full CSS / JavaScript selector to this element |
description | string | A human-readable description of the selected element |
use | array<string> | A list of the attributes of the element that are used to build selector. Any of: selector, path, tag, text, attr_id, attr_class, attr_href, attr_title, attr_type, attr_name, arity, shadow_selector, path_index, attr_data, attr_aria_labelledby, or attr_aria_label. If selector is included then the element will be selected ONLY by the selector |
path | string | A complete CSS Path from the body down to the element |
tag | string | The HTML tag name of the element (e.g., div, a, button). |
text | string | The visible text content of the element. |
attr_id | string | The value of the element’s id attribute, if present. |
attr_class | string | The value(s) of the element’s class attribute, typically space-separated. |
attr_href | string | The value of the href attribute (used in links, anchors, etc.). |
attr_title | string | The value of the title attribute, often used for tooltips. |
attr_type | string | The value of the type attribute (e.g., text, password, button). |
attr_name | string | The value of the name attribute, often used in form controls. |
arity | string | Represents the number of child nodes or arguments for the element. |
shadow_selector | string | A selector path inside a shadow DOM, if the element resides in one. |
path_index | string | Index-based representation of the element’s location in the DOM hierarchy. |
attr_data | string | Custom data-* attribute value(s) associated with the element. |
attr_aria_labelledby | string | Value of the aria-labelledby attribute (points to element IDs). |
attr_aria_label | string | Value of the aria-label attribute, providing accessibility text. |
Example element JSON
How element selection works
Chameleon uses theuse array to determine which attributes to combine when building the runtime selector. This enables resilient element targeting even when your UI changes:
selectoronly — Whenuseincludesselector, the raw CSS/JS selector is used directly. Best for stable, unique selectors like#my-button.- Combined attributes — When
useincludes 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_selectorprovides 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 appropriateexpand parameter.
For example, a Step’s trigger_element and position_element fields are Element objects:

