Flexbox
Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities.
The documentation page is highly inspired by A Complete Guide to Flexbox. We highly encourage you to read and memorize it.
Properties for the Parent
display
<Box display="flex">…
justify-content
<Box justifyContent="flex-start">…
<Box justifyContent="center">…
<Box justifyContent="flex-end">…
align-items
<Box alignItems="flex-start">…
<Box alignItems="flex-end">…
<Box alignItems="center">…
Properties for the Children
order
<Box order={2}>Item 1</Box>
<Box order={3}>Item 2</Box>
<Box order={1}>Item 3</Box>
flex-shrink
<Box width="100%">Item 1</Box>
<Box flexShrink={1}>Item 2</Box>
<Box flexShrink={0}>Item 3</Box>
API
import { flexbox } from '@material-ui/system';
Import name | Prop | CSS property | Theme key |
---|---|---|---|
flexDirection |
flexDirection |
flex-direction |
none |
flexWrap |
flexWrap |
flex-wrap |
none |
justifyContent |
justifyContent |
justify-content |
none |
alignItems |
alignItems |
align-items |
none |
alignContent |
alignContent |
align-content |
none |
order |
order |
order |
none |
flex |
flex |
flex |
none |
flexGrow |
flexGrow |
flex-grow |
none |
flexShrink |
flexShrink |
flex-shrink |
none |
alignSelf |
alignSelf |
align-self |
none |