Skip to main content

RootElement

The RootElement in the DOM is where the SX RecorderSDK UI begins. It's initially hidden and appears on user interaction, like a button click (e.g., a modal). Alternatively, it can be visible from the start. The shadow-root ensures the UI is encapsulated, preventing conflicts with the rest of the page.

SX RecorderSDK UI can also be rendered directly into the DOM on first paint. This is achieved by setting the RootElement to be an element that is not hidden, but already a part of the DOM.

Example banner

info

In Red: Defining root element as a modal to contain the UI