extends ../../layouts/LayoutComponent
include ../../mixins/utilities/Flex
append variables
-
var pageHeader = {
title: 'Flex',
description: '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.',
url: `https://getbootstrap.com/docs/${bootstrapVersion}/utilities/flex/`,
linkText: 'Flex on Bootstrap'
}
append content
+PageHeader(pageHeader)
+ComponentCard({
title: 'Flex Behaviors',
description: `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.`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexBasic
+ComponentCard({
title: 'Direction Row',
description: `Use .flex-row to set a horizontal direction (the browser default), or .flex-row-reverse to start the horizontal direction from the opposite side.`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexDirection.flex-row
+FlexDirection.flex-row-reverse
p.mt-3
+ComponentCard({
title: 'Direction Column',
description: `Use
.flex-column
to set a vertical direction, or
.flex-column-reverse
to start the vertical direction from the opposite side`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexDirection.flex-column
+FlexDirection.flex-column-reverse
+ComponentCard({
title: 'Justify Content',
description: `justify-contentjustify-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 , oraround.`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexJustifyContent
+ComponentCard({
title: 'Align items',
description: `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). `,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexAlignItem
+ComponentCard({
title: 'Align self',
description: `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).`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexAlignSelf("start").align-self-start
+FlexAlignSelf("end").align-self-end
+FlexAlignSelf("center").align-self-center
+FlexAlignSelf("baseline").align-self-baseline
+FlexAlignSelf("stretch").align-self-stretch
+ComponentCard({
title: 'Fill',
description: `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.`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexFill
+ComponentCard({
title: 'Flex Grow',
descriptionEl: `
Use .flex-grow-* utilities 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.
Use .flex-shrink-* utilities 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 .w-100.
.me-auto ), and pushing two items to the left (.ms-auto ).`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexMargin
+ComponentCard({
title: 'Align items',
description: `Vertically move one flex item to the top or bottom of a container by mixing
align-items ,
flex-direction: column , and
margin-top: auto or margin-bottom: auto. `,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexWithAlignItems.align-items-start
+FlexWithAlignItems.align-items-end
+ComponentCard({
title: 'Wrap',
description: `Change how flex items wrap in a flex container. Choose from no wrapping at all (the browser default) with .flex-nowrap , wrapping with.flex-wrap , or reverse wrapping with.flex-wrap-reverse .`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexNoWrap
+FlexWrap.flex-wrap
+FlexWrap.flex-wrap-reverse
+ComponentCard({
title: 'Order',
description: `Change the visualorder of specific flex items with a handful of order utilities. We only provide options for making an item first or last, as well as a reset to use the DOM order. As order takes any integer value (e.g., 5 ), add custom CSS for any additional values needed.`,
anchor:true,
descriptionClass:'mt-2'
}).mb-3
+FlexOrder
+ComponentCard({
title: 'Aligh content',
description: `Use align-content utilities on flexbox containers to align flex itemstogetheron 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.`,
anchor:true,
descriptionClass:'mt-2'
})
+FlexAlignContent.align-content-start
+FlexAlignContent.align-content-center
+FlexAlignContent.align-content-end
+FlexAlignContent.align-content-between
+FlexAlignContent.align-content-around
+FlexAlignContent.align-content-stretch