Skip to content

TechHub/react-native-tags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-Native-Tags

Build Status

A component that allows you to input text and formats the text into a tag when a space or comma is entered.

import React from 'react';
import Tags from 'react-native-tags';
const UselessComponent = () => <Tags 
  initialText=""
  initialTags={['dog', 'cat', 'chicken]}
  onChangeTags={() => noop}
  onTagPress={ (index, tagLabel, event) => console.log(index, tagLabel, event) }
  inputStyle={{ backgroundColor: 'white' }}
/>;

Props

initialText PropTypes.string

Populates the text input.

initialTags PropTypes.array

Populates the tags.

onTagsChange PropTypes.func

Callback that is called when a tag is added or removed.

onTagPress PropTypes.func

Callback that is called when a tag is pressed. Receive (index, tagLabel, event)

inputStyle PropTypes.object

Object to style the TextInput component

About

Tag input component for React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%