Flex API

API reference for the Flex component: its props with their token values and defaults, the styled-system prop groups, and forwarded HTML attributes.

Demos

For usage examples, visit the component demo page: Flex

Import

import { Flex } from '@soroush.tech/design-system/Flex'

Flex-specific props

flexDirection

ValueCSS
"column"flex-direction: column
"row"flex-direction: row
"column-reverse"flex-direction: column-reverse
"row-reverse"flex-direction: row-reverse

Default: "column".

gap

Inherited from View. Resolves against theme.space. Maps to CSS gap.

KeyCSS value
00
0.54px
18px
1.512px
216px
324px
432px
540px
648px
756px
864px
"auto"auto

Flexbox props

PropCSS property
flexDirectionflex-direction
justifyContentjustify-content
alignItemsalign-items
alignContentalign-content
flexWrapflex-wrap
flexflex
flexGrowflex-grow
flexShrinkflex-shrink
flexBasisflex-basis
alignSelfalign-self
justifySelfjustify-self
orderorder

Inherited from View

See View props for the full list: space, layout, bg, border, and position props.


Source code

If this page does not answer your question, have a look at the implementation of the component for more detail.