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

The flex utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The flex direction utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The flex wrap utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The flex align utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The flex align self utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The flex justify utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.


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

The order utility classes have not been modified from the U.S. Web Design System (USWDS). Refer to the USWDS Flex utility page for a complete listing of classes.