Wrapping code in a component

You can build a component using code and other components, such as:

You can also use registered external components and Sitecore components directly in the canvas of the page builder. However, there are benefits to first wrapping a component in another Sitecore component in the XM Cloud Components builder. It lets you:

  • Build UI around the code component, for example, to add text, copy, and images around an existing component.

  • Create responsive versions of the code component.

  • Control the styling of the component from XM Cloud Components.

Note

Theme of the Sitecore component cascades down to override the styling of the external components that are being embedded, such as React and web components. This concerns paragraphs, links, headers, and buttons styling.

Do you have some feedback for us?

If you have suggestions for improving this article,