Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities. For more complex implementations, custom CSS may be necessary.
Enable flex behaviors
Apply display
utilities to create a flexbox container and transform direct children elements into flex items.
Flex containers and items are able to be modified further with additional flex properties.
<template>
<b-div
flex
padding="2"
>
I'm a flexbox container!
</b-div>
</template>
<template>
<b-div
flex="inline"
padding="2"
>
I'm an inline flexbox container!
</b-div>
</template>
Responsive variations also exist for display="flex
and display="inline-flex
.
display="flex"
display="inline-flex"
display="sm-flex"
display="sm-inline-flex"
display="md-flex"
display="md-inline-flex"
display="lg-flex"
display="lg-inline-flex"
display="xl-flex"
display="xl-inline-flex"
display="xxl-flex"
display="xxl-inline-flex"
Direction
Set the direction of flex items in a flex container with direction utilities.In most cases you can omit the horizontal class here as the browser default is row
.
However, you may encounter situations where you needed to explicitly set this value (like responsive layouts).
Use flex-direction="row"
to set a horizontal direction (the browser default), or flex-direction="row-reverse"
to start the horizontal direction from the opposite side.
<template>
<b-div
flex
margin="y-4"
flex-direction="row"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="y-4"
flex-direction="row-reverse"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
</template>
Use flex-direction="column"
to set a vertical direction, or flex-direction="column-reverse"
to start the vertical direction from the opposite side.
<template>
<b-div
flex
margin="y-4"
flex-direction="column"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="y-4"
flex-direction="column-reverse"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
</template>
Responsive variations also exist for flex-direction
.
Justify content
Use justify-content
attribute 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
, around
, or evenly
.
<template>
<b-div
flex
margin="4"
justify-content="start"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="4"
justify-content="end"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="4"
justify-content="center"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="4"
justify-content="between"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="4"
justify-content="around"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
<b-div
flex
margin="4"
justify-content="evenly"
>
<b-div padding="2">
Flex item 1
</b-div>
<b-div padding="2">
Flex item 2
</b-div>
<b-div padding="2">
Flex item 3
</b-div>
</b-div>
</template>
Responsive variations also exist for justify-content
.
Align items
Use align-items
attribute 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).
<template>
<b-div
flex
align-items="start"
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
align-items="end"
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
align-items="center"
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
align-items="baseline"
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
align-items="stretch"
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for align-items
.
align-items="start"
align-items="end"
align-items="center"
align-items="baseline"
align-items="stretch"
align-items="sm-start"
align-items="sm-end"
align-items="sm-center"
align-items="sm-baseline"
align-items="sm-stretch"
align-items="md-start"
align-items="md-end"
align-items="md-center"
align-items="md-baseline"
align-items="md-stretch"
align-items="lg-start"
align-items="lg-end"
align-items="lg-center"
align-items="lg-baseline"
align-items="lg-stretch"
align-items="xl-start"
align-items="xl-end"
align-items="xl-center"
align-items="xl-baseline"
align-items="xl-stretch"
align-items="xxl-start"
align-items="xxl-end"
align-items="xxl-center"
align-items="xxl-baseline"
align-items="xxl-stretch"
Align self
Use align-self
attribute 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).
<template>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div
align-self="start"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div
align-self="end"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div
align-self="center"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div
align-self="baseline"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div
align-self="stretch"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for align-self
.
align-self="start"
align-self="end"
align-self="center"
align-self="baseline"
align-self="stretch"
align-self="sm-start"
align-self="sm-end"
align-self="sm-center"
align-self="sm-baseline"
align-self="sm-stretch"
align-self="md-start"
align-self="md-end"
align-self="md-center"
align-self="md-baseline"
align-self="md-stretch"
align-self="lg-start"
align-self="lg-end"
align-self="lg-center"
align-self="lg-baseline"
align-self="lg-stretch"
align-self="xl-start"
align-self="xl-end"
align-self="xl-center"
align-self="xl-baseline"
align-self="xl-stretch"
align-self="xxl-start"
align-self="xxl-end"
align-self="xxl-center"
align-self="xxl-baseline"
align-self="xxl-stretch"
Fill
Use the flex-fill
class on a series of sibling elements to force them into widths equal to their content (or equal widths if their content does not surpass their border-boxes) while taking up all available horizontal space.
<template>
<b-div
flex
border-color="highlight"
>
<b-div
flex-fill
padding="2"
border-color="highlight"
>
Flex item with a lot of content
</b-div>
<b-div
flex-fill
padding="2"
border-color="highlight"
>
Flex item
</b-div>
<b-div
flex-fill
padding="2"
border-color="highlight"
>
Flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for flex-fill
.
flex="fill"
flex="sm-fill"
flex="md-fill"
flex="lg-fill"
flex="xl-fill"
flex="xxl-fill"
Grow and shrink
Use flex-grow-*
attribute to toggle a flex item's ability to grow to fill available space.
In the example below, the flex-grow="1"
elements uses all available space it can, while allowing the remaining two flex items their necessary space.
<template>
<b-div flex>
<b-div
:padding="2"
flex-grow="1"
>
Flex item
</b-div>
<b-div :padding="2">
Flex item
</b-div>
<b-div :padding="2">
Third flex item
</b-div>
</b-div>
</template>
Use flex-shrink
attributes to toggle a flex item's ability to shrink if necessary.
In the example below, the second flex item with flex-shrink="1"
is forced to wrap its contents to a new line, "shrinking" to allow more space for the previous flex item with width="100"
.
<template>
<b-div flex>
<b-div
padding="2"
relative-width="100"
>
Flex item
</b-div>
<b-div
padding="2"
flex-shrink="1"
>
Flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for flex-grow
and flex-shrink
.
<template>
<b-div flex>
<b-div
padding="2"
relative-width="100"
>
Flex item
</b-div>
<b-div
padding="2"
flex-shrink="1"
>
Flex item
</b-div>
</b-div>
</template>
Auto margins
Flexbox can do some pretty awesome things when you 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 (margin="e-auto"
), and pushing two items to the left (margin="s-auto"
).
<template>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div
margin="e-auto"
padding="2"
>
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
margin="b-3"
style="height: 100px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div
margin="s-auto"
padding="2"
>
Flex item
</b-div>
</b-div>
</template>
With align-items
Vertically move one flex item to the top or bottom of a container by mixing align-items
, flex-direction="column"
, and margin="t-auto"
or margin="b-auto"
.
<template>
<b-div
flex
align-items="start"
flex-direction="column"
margin="b-3"
style="height: 200px"
>
<b-div
margin="Anchoruto"
:padding="2"
>
Flex item
</b-div>
<b-div :padding="2">
Flex item
</b-div>
<b-div :padding="2">
Flex item
</b-div>
</b-div>
<b-div
flex
align-items="end"
flex-direction="column"
margin="b-3"
style="height: 200px"
>
<b-div :padding="2">
Flex item
</b-div>
<b-div :padding="2">
Flex item
</b-div>
<b-div
margin="t-auto"
:padding="2"
>
Flex item
</b-div>
</b-div>
</template>
Wrap
Change how flex items wrap in a flex container. Choose from no wrapping at all (the browser default) with flex-wrap="nowrap"
, wrapping with flex-wrap="wrap"
, or reverse" wrapping with flex-wrap="wrap-reverse
.
<template>
<b-div
flex
flex-wrap="nowrap"
style="width: 8rem"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
flex-wrap="wrap"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div>
<b-div
flex
flex-wrap="wrap-reverse"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</b-div>
</template>
Responsive variations also exist for flex-wrap
.
<template>
<b-div>
<b-div
flex
flex-wrap="wrap-reverse"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</b-div>
</template>
Order
Change the _visual_ order of specific flex items with a handful of flex-order
ttribute.
We only provide options for making an item first or last, as well as a reset to use the DOM order.
As flex-order
takes any integer value from 0 to 5, add custom CSS for any additional values needed.
<template>
<b-div
flex
flex-wrap="nowrap"
>
<b-div
flex-order="3"
padding="2"
>
First flex item
</b-div>
<b-div
flex-order="2"
padding="2"
>
Second flex item
</b-div>
<b-div
flex-order="1"
padding="2"
>
Third flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for flex-order
.
flex-order="0"
flex-order="1"
flex-order="2"
flex-order="3"
flex-order="4"
flex-order="5"
flex-order="sm-0"
flex-order="sm-1"
flex-order="sm-2"
flex-order="sm-3"
flex-order="sm-4"
flex-order="sm-5"
flex-order="md-0"
flex-order="md-1"
flex-order="md-2"
flex-order="md-3"
flex-order="md-4"
flex-order="md-5"
flex-order="lg-0"
flex-order="lg-1"
flex-order="lg-2"
flex-order="lg-3"
flex-order="lg-4"
flex-order="lg-5"
flex-order="xl-0"
flex-order="xl-1"
flex-order="xl-2"
flex-order="xl-3"
flex-order="xl-4"
flex-order="xl-5"
flex-order="xxl-0"
flex-order="xxl-1"
flex-order="xxl-2"
flex-order="xxl-3"
flex-order="xxl-4"
flex-order="xxl-5"
Additionally there are also responsive flex-order="first"
and flex-order="last"
classes that change the flex-order
of an element by applying flex-order="-1"
and flex-order="6"
, respectively.
flex-order="first"
flex-order="last"
flex-order="sm-first"
flex-order="sm-last"
flex-order="md-first"
flex-order="md-last"
flex-order="lg-first"
flex-order="lg-last"
flex-order="xl-first"
flex-order="xl-last"
flex-order="xxl-first"
flex-order="xxl-last"
Align content
Use align-content
attribute on flexbox containers to align flex items *together* on the cross axis.
Choose from start
(browser default), end
, center
, between
, around
, or stretch
.
To demonstrate these utilities, we've enforced flex-wrap="wrap"
and increased the number of flex items.
Heads up! This property has no effect on single rows of flex items.
<template>
<b-div
flex
align-content="start"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
align-content="end"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
align-content="center"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
align-content="between"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
align-content="around"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
<template>
<b-div
flex
align-content="stretch"
flex-wrap="wrap"
margin="b-3"
style="height: 200px"
>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
<b-div padding="2">
Flex item
</b-div>
</b-div>
</template>
Responsive variations also exist for align-content
.
align-content="start"
align-content="end"
align-content="center"
align-content="around"
align-content="stretch"
align-content="sm-start"
align-content="sm-end"
align-content="sm-center"
align-content="sm-around"
align-content="sm-stretch"
align-content="md-start"
align-content="md-end"
align-content="md-center"
align-content="md-around"
align-content="md-stretch"
align-content="lg-start"
align-content="lg-end"
align-content="lg-center"
align-content="lg-around"
align-content="lg-stretch"
align-content="xl-start"
align-content="xl-end"
align-content="xl-center"
align-content="xl-around"
align-content="xl-stretch"
align-content="xxl-start"
align-content="xxl-end"
align-content="xxl-center"
align-content="xxl-around"
align-content="xxl-stretch"
Media object
<template>
<b-div flex>
<b-div flex-shrink="0">
<b-img
src="https://dummyimage.com/100x100/e5e5e5/999&text=image"
fluid
alt="Card image cap"
/>
</b-div>
<b-div
flex-grow="1"
margin="s-3"
>
This is some content from a media component. You can replace this with any
content and adjust it as needed.
</b-div>
</b-div>
</template>
And say you want to vertically center the content next to the image:
<template>
<b-div
flex
align-items="center"
>
<b-div flex-shrink="0">
<b-img
src="https://dummyimage.com/100x100/e5e5e5/999&text=image"
fluid
alt="Card image cap"
/>
</b-div>
<b-div
flex-grow="1"
margin="s-3"
>
This is some content from a media component. You can replace this with any
content and adjust it as needed.
</b-div>
</b-div>
</template>
Flex Component
You can also use <Flex />
as a shortcut for <b-div flex />
.
<template>
<Flex padding="2">
I'm an inline flexbox container!
</Flex>
</template>
The flex-
prefix for attributes can be omitted.
To make the structure clearer, you can also use the <FlexItem />
component.
Examples
FlexIconBlock
Contact Support
Reach out to our support team for assistance with your inquiries.
<template>
<Flex>
<FlexItem padding="3">
<BIcon
icon="bi:chat-left-text"
display-headings="5"
text-color="primary"
/>
</FlexItem>
<FlexItem grow="1">
<b-p headings="4">Contact Support</b-p>
<b-p text-color="secondary">
Reach out to our support team for assistance with your inquiries.
</b-p>
</FlexItem>
</Flex>
</template>