[Vuejs]-Is there a way to add line breaks in b-form-checkbox-group?

5👍

Don’t use the options array. Render each option as it’s own <b-form-checkbox> inside of the <b-form-checkbox> group, and on each <b-form-checkbox> add the class mb-1, mb-2, mb-3, mb-4, or mb-5 (these are margin bottom spacing helper classes).

<b-form-checkbox-group
  id="flavours"
  v-model="selected"
  name="flavours"
  class="ml-4"
  aria-label="Individual flavours"
  stacked
>
  <b-form-checkbox
    v-for="flavour in flavours"
    :value="flavour"
    class="mb-5"
  >
    {{ flavour }}
  </b-form-checkbox>
</b-form-checkbox-group>

Leave a comment