apps/mantine.dev/src/pages/core/flex.mdx
import { FLEX_STYLE_PROPS_DATA } from '@mantine/core'; import { FlexDemos } from '@docs/demos'; import { StylePropsTable } from '@/components/StylePropsTable'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.Flex);
Flex component props can have responsive values the same way as other style props:
The Flex component is an alternative to Group and Stack.
Flex is more flexible – it allows creating both horizontal and vertical flexbox layouts, but requires more configuration.
Unlike Group and Stack, Flex is polymorphic and supports responsive props.
<DataTable head={['', 'Group', 'Stack', 'Flex']} data={[ ['Direction', 'horizontal', 'vertical', 'both'], ['Equal width children', '✅', '❌', '❌'], ['flex-wrap support', '✅', '❌', '✅'], ['Responsive flexbox props', '❌', '❌', '✅'], ['Polymorphic component', '❌', '❌', '✅'], ]} />
<FlexboxGapSupport component="Flex" />