React Native MantineLayout

Grid

Flexible grid layout

Import: import { Grid } from 'react-native-mantine';

Usage

import { Grid, Paper, Text } from 'react-native-mantine';

<Grid gutter="md">
  <Grid.Col span={8}>
    <Paper p="md"><Text>Main</Text></Paper>
  </Grid.Col>
  <Grid.Col span={4}>
    <Paper p="md"><Text>Sidebar</Text></Paper>
  </Grid.Col>
</Grid>

Props

PropTypeDefaultDescription
columnsnumberNumber of columns in the grid
gutterMantineNumberSizeSpacing between columns and rows
growbooleanGrow columns to fit available space
align'stretch' | 'center' | 'flex-start' | 'flex-end'Align items vertically
justify'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around'Justify items horizontally
childrenReact.ReactNodeGrid children
styleanyAdditional styles
testIDstringTest identifier used by testing frameworks

Source on GitHub · npm