React Native MantineLayout

Group

Horizontal layout with spacing control

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

Usage

import { Group, Button , Badge } from 'react-native-mantine';

// Basic group with spacing
<Group spacing={16}>
  <Button>First</Button>
  <Button>Second</Button>
  <Button>Third</Button>
</Group>

// Centered group with alignment
<Group position="center" align="center" spacing={12}>
  <Badge>Badge 1</Badge>
  <Badge>Badge 2</Badge>
</Group>

// Space-between layout
<Group position="apart">
  <Button>Left</Button>
  <Button>Right</Button>
</Group>

Props

PropTypeDefaultDescription
children (required)React.ReactNodeComponents to be arranged horizontally in a row
spacingnumber5Horizontal spacing (gap) between grouped children in pixels
positionstringHorizontal distribution: "apart" (space-between), "center" (centered), "right" (flex-end), or default (flex-start)
align'start' | 'center' | 'end' | 'baseline' | 'stretch'Vertical alignment of children using flexbox alignItems values
alignCenterbooleantrueIf true, vertically centers children (shorthand for align="center")
alignBottombooleanfalseIf true, aligns children to bottom (shorthand for align="end")
noWrapbooleanfalseIf true, prevents children from wrapping to next line (flexWrap: "nowrap")
styleViewStyleAdditional styles applied to the group container
fullWidthbooleanIf true, sets width to 100% of parent container
fullHeightbooleanIf true, sets height to 100% of parent container
pstring | numberPadding on all sides (accepts "xs", "sm", "md", "lg", "xl" or number)
pxstring | numberHorizontal padding (left and right)
pystring | numberVertical padding (top and bottom)
ptstring | numberPadding top
pbstring | numberPadding bottom
plstring | numberPadding left
prstring | numberPadding right
mstring | numberMargin on all sides (accepts "xs", "sm", "md", "lg", "xl" or number)
mxstring | numberHorizontal margin (left and right)
mystring | numberVertical margin (top and bottom)
mtstring | numberMargin top
mbstring | numberMargin bottom
mlstring | numberMargin left
mrstring | numberMargin right

Source on GitHub · npm