0.0.18 • Published 7 years ago

@cutii/react-native-tag-input v0.0.18

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

React Native Tag Input

alt text

Simple Example

import TagInput from 'react-native-tag-input';

...

<TagInput
  value={this.state.emails}
  onChange={(emails) => this.onEmailChange(emails)}
  labelExtractor={(email) => email}
/>
Available PropertiesDescription
onChange(Required) A handler to be called when array of tags change. When new tags are added, they are appended as strings. If you use a non-string item type, make sure to either translate the strings to your item type before passing this value on to the "value" prop, or otherwise make sure your labelExtractor can handle both your item type and strings.
value(Required) An array of tags, which can be any type, as long as labelExtractor below can extract a string from it.
labelExtractor(Required) Function to extract string value for label from item
separatorsAn array of characters to use as tag separators
regexA RegExp to test tags after enter, space, or a comma is pressed
tagColorBackground color of tags
tagTextColorText color of tags
tagContainerStyleStyling override for container surrounding tag text
tagTextStyleStyling override for tag's text component
inputColorColor of text input
inputPropsAny misc. TextInput props (autoFocus, placeholder, returnKeyType, etc.)
maxHeightMax height of the tag input on screen (will scroll if max height reached)
onHeightChangeCallback that gets passed the new component height when it changes
parseOnBlurWhether to treat a blur event as a separator entry (iOS-only)