Is it possible to set the default grid width for a component out of the box in SXA? Let me explain the thought process behind this to hopefully highlight the problem.

I have a component that has four variants, each of these is designed to sit at a particular grid width. Is this something I can configure per variant (I am aware this is very unlikely) or failing that, potentially assign it per component?

As an example:

Variant 1: Default grid with of 4

Variant 2: Default grid width of 8

If either of my options are not possible, or highly not recommended, what options do I have in order to minimise the potential for user error when configuring component grid width?

Environment Details

SXA 1.8

Sitecore 9.1

Many thanks in advance.

1 Answer 1


This is not possible out of the box.

What we did is setting col-4 / col-8 or specific col-md-4 or col-lg-4 respective classes on Rendering Variant level.

There is a field Css Class that will be combined with Css Class field on Rendering itself.

By this combination you can achieve what you want.

You can even use Allowed in templates field on your Rendering Variants to specify which one will be used on which template to help out content editors to choose correct Rendering Variant for that particular page.

Take a look here: https://doc.sitecore.com/developers/sxa/18/sitecore-experience-accelerator/en/create-a-rendering-variant.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.