Skip to content

Flex

Deprecated

The Flex component behaves the same as the Box component except that it has display: flex set by default.

Deprecation

Use Box instead.

Before

<Flex flexWrap="nowrap">
<Box p={3} color="text.inverse" bg="bg.infoInverse">
Item 1
</Box>
</Flex>

After

<Box display="flex" flexWrap="nowrap">
<Box p={3} color="text.inverse" bg="bg.infoInverse">
Item 1
</Box>
</Box>

Default example

Item 1
Item 2
Item 3

System props

Flex components get FLEX, COMMON, and LAYOUT system props.

Read our System Props doc page for a full list of available props.

Component props

Flex does not get any additional props other than the system props mentioned above.

Edit this page on GitHub
3 contributorsVanAndersonBinaryMuseemplums
Last edited by VanAnderson on July 22, 2021