Add defined styles to the container

Hi, I’m new to this community, I’m also recently starting to work with the Bloomreach CMS. My question briefly is that we recently were asked to be able to change a sticky position of one component in the CMS.
Components are currently integrated with React. Our problem is that the components are wrapped by a container that I’m not sure if I can access or change its styles. I would like to know if there is a way, since the div node does not allow me to do this behavior on my component.

Hi,
You can use a mapping to dictate the template for each container type. You can also use xtype ‘nomarkup’ which will not wrap the container components with anything. Be mindful though that you do provide a ‘root’ element for each container yourself if you do decide to use ‘nomarkup’ containers.

This way you can influence the rendered output for a container and you can potentially add styles directly or add css classes to style your container.

1 Like

Hi @durbonca!

If you are looking for a way to style your components regardless of their parent container markup, then your best bet would be to make use of the nomarkup containers.

You can read more about them here:

It should be enough to set the xtype property to hst.nomarkup.

Let me know if this works!

1 Like

Hey, hey!

This property can be set through the Site development UI

You can read more about that here:

Hope this helps!

1 Like

Thanks! We should to try it. We are still familiarize with the cms