Skip to main content
An official website of the United States government

Flex

Set an item’s flexbox properties.

Utility Modules


Flex

Sets how a flex item will grow or shrink to fit the space available in its flex container.

Mixins and Functions

UtilityMixinExample
.flex-flexu-flex(flex)@include u-flex('fill')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
flexFalseNone0.06 KB0.33 KB
.flex-1
.flex-2
.flex-3
.flex-4
.flex-5
.flex-6
.flex-7
.flex-8
.flex-9
.flex-10
.flex-11
.flex-12
.flex-auto
.flex-full

Flex direction

Sets how flex items are placed in the flex container defining the main axis and the direction.

Mixins and Functions

UtilityMixinExample
.flex-directionu-flex(direction)@include u-flex('row')@include u-flex('column')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
flex-directionFalseNone0.02 KB0.1 KB
.flex-column
.flex-row

Flex wrap

Sets whether flex items are forced onto one line or can wrap onto multiple lines.

Mixins and Functions

UtilityMixinExample
.flex-wrapu-flex(wrap)@include u-flex('wrap')@include u-flex('no-wrap')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
flex-wrapFalseNone0.02 KB0.1 KB
.flex-wrap
.grid-col-4
.grid-col-4
.grid-col-4
.grid-col-4
.flex-no-wrap
.grid-col-4
.grid-col-4
.grid-col-4
.grid-col-4

Flex align

Controls the alignment of flex items on the cross axis.

Mixins and Functions

UtilityMixinExample
.flex-align-valueu-flex('align-value')@include u-flex('align-center')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
align-itemsFalseNone0.04 KB0.24 KB
.flex-column
.flex-align-start
.flex-align-center
.flex-align-end
.flex-align-stretch
.flex-row
.flex-align-start
.flex-align-center
.flex-align-end
.flex-align-stretch

Flex align self

Mixins and Functions

UtilityMixinExample
.flex-align-self-valueu-flex('align-self-value')@include u-flex('align-self-center')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
align-selfFalseNone0.06 KB0.31 KB
.flex-column
.flex-align-self-start
.flex-align-self-center
.flex-align-self-end
.flex-align-self-stretch
.flex-row
.flex-align-self-start
.flex-align-self-center
.flex-align-self-end
.flex-align-self-stretch

Flex justify

Defines how the browser distributes the space between and around content items along the main axis of a flex container.

Mixins and Functions

UtilityMixinExample
.flex-justify-optionu-flex(justify-option)@include u-flex('justify')@include u-flex('justify-start')@include u-flex('justify-center')@include u-flex('justify-end')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
justify-contentFalseNone0.18 KB0.95 KB
.flex-column
.flex-justify
.flex-justify-start
.flex-justify-center
.flex-justify-end

Order

Sets the order to lay out an item in a flex container. Items in a container are sorted by ascending order value and then by their source order.

Mixins and Functions

UtilityMixinExample
.order-orderu-order(order)@include u-order('last')

Utility Classes

Utility module usage information
Module nameAre responsive modifiers turned on?Active state modifiersGzip file sizeNon-gzip file size
orderTrueNone0.26 KB1.4 KB
intital: 1.order-11
intital: 2.order-10
intital: 3.order-9
intital: 4.order-8
intital: 5.order-7
intital: 6.order-6
intital: 7.order-5
intital: 8.order-4
intital: 9.order-3
intital: 10.order-2
intital: 11.order-1
intital: 12.order-0
intital: 13.order-initial
intital: 14.order-last
intital: 15.order-first