how to set proper spacing on flexLayout

How do i get the spacing on the components on flexLayout, if i use flexLayout.setJustifyContentMode(JustifyContentMode.BETWEEN); when i make the components wrap the button gets placed on the center, and if i use START, the button gets placed on the left but the spacing is gone. or is there a way to make a HorizontalLayout wrap components?

I personally would use LumoUtility.Gap.SMALL as class name

the same happens

Do you have lumo utilities activated in your theme.json?

i think i do

but i’m on quarkus so idk if this has something to do with that

It should theoretically work there as well… if you already have added a class name to it, you can also try “gap: 1rem” in your css file

yeah what Knoobie proposed should work, but you can also make a horizontallayout wrap e.g. with getStyle().set("flex-wrap", "wrap");

I used the method Rolf mentioned and it worked perfectly, thanks