React Native MantineInputs

Chip

Selectable tag with checkmark

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

Usage

import { Chip } from 'react-native-mantine';

<Chip
  checked={checked}
  onChange={setChecked}
  color="blue"
  size="sm"
>
  React Native
</Chip>

// With Group
<Chip.Group value={value} onChange={setValue}>
  <Chip value="react">React</Chip>
  <Chip value="vue">Vue</Chip>
  <Chip value="angular">Angular</Chip>
</Chip.Group>

Props

PropTypeDefaultDescription
children (required)React.ReactNodeChip components to be rendered within the group
valuestring | string[]Controlled selected value(s). Single string for single selection, array for multiple selection
defaultValuestring | string[]Default selected value(s) for uncontrolled mode
onChange(value: string | string[]) => voidCallback fired when selection changes, receives new value(s) as argument
multiplebooleanfalseIf true, multiple chips can be selected simultaneously
spacing'xs' | 'sm' | 'md' | 'lg' | 'xl'"sm"Spacing between chips in the group
styleViewStyleAdditional styles to apply to the group container

Source on GitHub · npm