Stacks

Shorthand helpers that build on top of our flexbox utilities to make component layout faster and easier than ever.

First item
Second item
Third item
<!--vertical-->
<div class="vstack gap-3">
    <div class="p-2">First item</div>
    <div class="p-2">Second item</div>
    <div class="p-2">Third item</div>
  </div>

Horizontal

First item
Second item
Third item
<!--horizontal-->
<div class="hstack gap-3">
    <div class="p-2">First item</div>
    <div class="p-2">Second item</div>
    <div class="p-2">Third item</div>
  </div>
 <!--Example vertical and horizontal-->
<div class="vstack gap-2 col-md-5 mx-auto mb-4">
    <button type="button" class="btn btn-secondary">Save changes</button>
    <button type="button" class="btn btn-outline-secondary">Cancel</button>
  </div>
  <div class="hstack gap-3">
    <input class="form-control me-auto" type="text" placeholder="Add your item here..." aria-label="Add your item here...">
    <button type="button" class="btn btn-secondary">Submit</button>
    <div class="vr"></div>
    <button type="button" class="btn btn-outline-danger">Reset</button>
  </div>