.gap-* classes.
Use .vstack to create vertical layouts. Combines display: flex,
flex-direction: column, and align-items: stretch.
Use .mt-auto to push items to the bottom of the container.
Use .vstack with column sizing for centered button groups.
Use .hstack for horizontal layouts. Combines display: flex,
flex-direction: row, and align-items: center.
Use .ms-auto to push items to the right.
Use .vr to create a vertical divider between items.
Combine .hstack with form controls for inline layouts.
Use .hstack with auto margins for navbar-like layouts.
Gap utilities range from .gap-0 (no gap) to .gap-5 (3rem).
These work with both .vstack and .hstack.
.gap-0 (No Gap).gap-1 (0.25rem).gap-2 (0.5rem).gap-3 (1rem) - Default.gap-4 (1.5rem).gap-5 (3rem)
Nest stacks for complex layouts. Combine .vstack and .hstack
for flexible, responsive designs.
This is a sample card demonstrating nested stack layouts for user profiles.
This is a great example of using stacks for comment layouts!
Agreed! The nested stacks make this so clean.
Use responsive flex utilities to change stack direction at different breakpoints.
Note: .vstack and .hstack don't have responsive variants.
Use .d-flex with .flex-column / .flex-row instead.
Use .d-flex .flex-column .flex-md-row for responsive layouts.
Combine responsive gap utilities: .gap-2 .gap-md-4.