0.1.8 • Published 6 years ago

@christiandrey/react-native-emoji-selector v0.1.8

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

react-native-emoji-selector

Image preview

Installation

npm install --save react-native-emoji-selector
import EmojiSelector from 'react-native-emoji-selector'

Demo

Demo GIF

Usage

Basic usage

<EmojiSelector
    onEmojiSelected={emoji => console.log(emoji)}
/>

Setting a default category

If you'd like to define a different default category, you can import the Categories class.

import EmojiSelector, { Categories } from 'react-native-emoji-selector';

<EmojiSelector
    category={Categories.symbols}
    onEmojiSelected={emoji => console.log(emoji)}
/>

The available categories are all, people, nature, food, activities, places, objects, symbols, and flags.

Props

PropTypeDefaultDescription
onEmojiSelectedfuncFunction called when a user selects an Emoji
themestring007AFFTheme color used for loaders and active tab indicator
showTabsbooltrueToggle the tabs on or off
showSearchBarbooltrueToggle the searchbar on or off
showHistoryboolfalseToggle the history tab on or off
categoryenum.allSet the default category. Use the Categories class
columnsnumber6Number of columns accross

To do

  • Improve performance of switching tabs
  • Show loaders when loading a category