Emoji picker for react-native
Powered by the awesome emoji-datasource
Installation
npm install react-native-emoji-picker
EmojiPicker component
const EmojiPicker = ; Component { console } { return <View style=stylescontainer> <EmojiPicker style=stylesemojiPicker onEmojiSelected=this_emojiSelected/> </View> ; }
Component props
onEmojiSelected
(Function) - Required. Called when the user taps on an emoji.style
(Object) - Optional. Standard view style for the enclosing component.clearButtonText
(String) - Optional. Alternate text for the clear button. Defaults to 'Clear'.hideClearButton
(Bool) - Optional. Hide the clear button.rows
(Number) - Optional. Number of rows used to show all emojis. Defaults to 7.
EmojiOverlay component
Optional overlay which wraps the picker in a modal-like component
const EmojiOverlay = ; Component state = showPicker: false { this console } { return <View style=stylescontainer> <TouchableHighlight onPress= this> <Text> Show picker </Text> </TouchableHighlight> <EmojiOverlay style=stylesemojiPicker visible=thisstateshowPicker onTapOutside= this horizontal=true onEmojiSelected=this_emojiSelected/> </View> ; }
Component props
- (...all EmojiPicker props)
visible
(Bool) - Required. Is the overlay visibleonTapOutside
(Function) - Required. Callback for when user taps outside the EmojiPicker area. Should setvisible
tofalse