React Native MantineInputs

MultiSelect

Multi-option select with tags

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

Usage

import { useState } from 'react';
import { MultiSelect } from 'react-native-mantine';

const [value, setValue] = useState<string[]>([]);

<MultiSelect
  label="Choose frameworks"
  placeholder="Pick multiple"
  data={['React', 'Angular', 'Vue', 'Svelte']}
  value={value}
  onChange={setValue}
  searchable
  clearable
/>

Props

PropTypeDefaultDescription
data (required)(string | MultiSelectDataItem)[]MultiSelect data
valuestring[]Selected values
defaultValuestring[]Default value for uncontrolled component
onChange(value: string[]) => voidCalled when value changes
placeholderstringPlaceholder
labelReact.ReactNodeMultiSelect label
descriptionReact.ReactNodeMultiSelect description
errorReact.ReactNodeError message
sizeMantineSize'md'MultiSelect size
radiusMantineNumberSize'sm'Border radius
colorMantineColor'blue'MultiSelect color
disabledbooleanfalseIf true, multiselect will be disabled
searchablebooleanfalseIf true, multiselect will be searchable
searchPlaceholderstring'Search...'Search placeholder
clearablebooleanfalseIf true, clear button will be shown
clearButtonLabelstring'Clear all'Clear button label
maxDropdownHeightnumber400Max dropdown height
maxSelectedValuesnumber5Max selected values displayed
iconReact.ReactNodeIcon displayed on the left side
accessibilityLabelstringAccessibility label
accessibilityHintstringAccessibility hint
styleanyAdditional styles
testIDstringTest identifier used by testing frameworks

Source on GitHub · npm