Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.28 KB

flex.mdx

File metadata and controls

40 lines (28 loc) · 1.28 KB

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);

Usage

Supported props

Responsive props

Flex component props can have responsive values the same way as other style props:

Difference from Group and Stack

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', '❌', '❌', '✅'], ]} />