Use .flex-row to set a horizontal direction (the browser default), or .flex-row-reverse to start the horizontal direction from the opposite side. For columns, Use .flex-column to set a vertical direction, or .flex-column-reverse to start the vertical direction from the opposite side.
Here are all the supported classes:
.flex-row or .flex-{xs,sm,md,lg,xl,xxl}-row
.flex-row-reverse or .flex-{xs,sm,md,lg,xl,xxl}-row-reverse
.flex-column or .flex-{xs,sm,md,lg,xl,xxl}-column
.flex-column-reverse or .flex-{xs,sm,md,lg,xl,xxl}-column-reverse
Use justify-content utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if flex-direction: column). Choose from start (browser default), end, center, between, or around.
.justify-content-start or .justify-content-{xs,sm,md,lg,xl,xxl}-start
.justify-content-end or .justify-content-{xs,sm,md,lg,xl,xxl}-end
.justify-content-center or .justify-content-{xs,sm,md,lg,xl,xxl}-center
.justify-content-between or .justify-content-{xs,sm,md,lg,xl,xxl}-between
.justify-content-around or .justify-content-{xs,sm,md,lg,xl,xxl}-around
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if flex-direction: column). Choose from start, end, center, baseline, or stretch (browser default).
.align-items-start or .align-items-{xs,sm,md,lg,xl,xxl}-start
.align-items-end or .align-items-{xs,sm,md,lg,xl,xxl}-end
.align-items-center or .align-items-{xs,sm,md,lg,xl,xxl}-center
.align-items-baseline or .align-items-{xs,sm,md,lg,xl,xxl}-baseline
.align-items-stretch or .align-items-{xs,sm,md,lg,xl,xxl}-stretch
Use align-self utilities on flexbox items to individually change their alignment on the cross axis (the y-axis to start, x-axis if flex-direction: column). Choose from the same options as align-items: start, end, center, baseline, or stretch (browser default).
.align-self-start or .align-self-{xs,sm,md,lg,xl,xxl}-start
.align-self-end or .align-self-{xs,sm,md,lg,xl,xxl}-end
.align-self-center or .align-self-{xs,sm,md,lg,xl,xxl}-center
.align-self-baseline or .align-self-{xs,sm,md,lg,xl,xxl}-baseline
.align-self-stretch or .align-self-{xs,sm,md,lg,xl,xxl}-stretch
Item 1 with a longer of content added here for testing purposes
Item 2
Item 3
<br><br><divclass="d-flex"><divclass="flex-auto">Item 1 with a longer of content added here for testing purposes</div><divclass="flex-auto">Item 2</div><divclass="flex-auto">Item 3</div></div>
Grow and shrink
Use .flex-grow-* or .flex-shrink-* utilities to toggle a flex item's ability to grow/shrink to fill available space or shrink if necessary.
.flex-grow-0 or .flex-{xs,sm,md,lg,xl,xxl}-grow-0
.flex-grow-1 or .flex-{xs,sm,md,lg,xl,xxl}-grow-1
.flex-shrink-0 or .flex-{xs,sm,md,lg,xl,xxl}-shrink-0
.flex-shrink-1 or .flex-{xs,sm,md,lg,xl,xxl}-shrink-1
<br><br><divclass="d-flex"><divclass="flex-grow-1">Item with flex-grow: 1</div><divclass="">Item 2</div><divclass="">Item 3</div></div><br><br><divclass="d-flex"><divclass="flex-shrink-1">Item with flex-shrink:1</div><divclass="w-100">Item 2</div></div>
Auto margins
With flexbox you can mix flex alignments with auto margins. Shown below are three examples of controlling flex items via auto margins: default (no auto margin), pushing two items to the right (.me-auto), and pushing two items to the left (.ms-auto).
.me-auto or .me-{xs,sm,md,lg,xl,xxl}-auto - pushing items to the right
.ms-auto or .ms-{xs,sm,md,lg,xl,xxl}-auto - pushing items to the left
<br><br>
No margins
<divclass="d-flex"><divclass="">Item 1</div><divclass="">Item 2</div><divclass="">Item 3</div></div><br><br><code>.me-auto</code> - pushing items to the right
<divclass="d-flex"><divclass="me-auto">Item 1 with me-auto</div><divclass="">Item 2</div><divclass="">Item 3</div></div><br><br><code>.ms-auto</code> - pushing items to the left
<divclass="d-flex"><divclass="">Item 1</div><divclass="">Item 2</div><divclass="ms-auto">Item 3 with ms-auto</div></div>
Wrap
Change how flex items wrap in a flex container.
.flex-nowrap or .flex-{xs,sm,md,lg,xl,xxl}-nowrap (browser default)
.flex-wrap or .flex-{xs,sm,md,lg,xl,xxl}-wrap
.flex-wrap-reverse or .flex-{xs,sm,md,lg,xl,xxl}-wrap-reverse