vstack and hstack (Bootstrap 5.1+) simplify one-dimensional layouts with built-in gap via gap-*. They replace many ad-hoc d-flex flex-column snippets for forms and button rows.
When to use stacks
vstack gap-3— labeled form fields, card actions stacked verticallyhstack gap-2— inline badges, avatar + name rows- Combine with responsive display: wrap an
hstackin a column that goes full width on mobile
Similar to Tailwind’s flex flex-col gap-3, but Bootstrap names the pattern vstack so intent reads clearly in markup.
Self-check
- What is the difference between vstack and hstack?
- Which utility controls space between stack children?