Skip to content

Mentions textbox for React Native. Works on both ios and android. 🐠 🐳

License

Notifications You must be signed in to change notification settings

Parrryy/react-native-mentions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-mentions npm version

Mentions textbox for React Native. Works on both ios and android.

alt text

Installation

npm install --save react-native-mentions

Usage

import {MentionsTextInput} from 'react-native-mentions';

<MentionsTextInput
 textInputStyle={{ borderColor: '#ebebeb', borderWidth: 1, padding: 5, fontSize: 15 }}
 textInputMinHeight={35}
 textInputMaxHeight={85}
 returnKeyType={'send'}
 trigger={'@'}
 triggerLocation={'new-word-only'} // 'new-word-only', 'anywhere'
 value={this.state.value}
 onChangeText={(val) => { this.setState({ value: val }) } }
 suggestionsPanelHeight={45}
 renderSuggestionsRow={this.renderSuggestionsRow.bind(this)}
 suggestionsPanelStyle={{ backgroundColor: 'rgba(100,100,100,0.1)' }}
 suggestionsDataSource={this.state.ds}
 triggerCallback={this.callback.bind(this)}
 onKeyPress={(e) => { e.nativeEvent.key == "Enter" ? console.log("ENTER") : false } } 
/>

Example

Check full example in the sampleApp folder.

License

MIT License. © Harshana Abeyaratne

About

Mentions textbox for React Native. Works on both ios and android. 🐠 🐳

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.9%
  • Objective-C 22.0%
  • Python 8.2%
  • Java 6.9%