0.2.4 • Published 1 year ago

react-native-emoji-modal v0.2.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

react-native-emoji-modal

Feature-complete emoji picker for React Native that mimics the look and feel of native ones.

This is a rewrite of react-native-emoji-picker.

screenshot

Features:

  • Vertically scrolling with 7 columns of emoji
  • Search field
  • Category shortcuts
  • Supports iOS
  • Supports Android
    • It's aware of Android versions and their availability of emojis
  • Supports react-native-web
    • Except for category shortcuts (PRs welcome to fix this!)
  • Written in TypeScript
  • Lightweight
    • Loads just 163 kB worth of emoji data, versus 1.2 MB in react-native-emoji-picker

Installation

pnpm add react-native-emoji-modal

or

npm install --save react-native-emoji-modal

Usage

import EmojiModal from 'react-native-emoji-modal';

// ...

<EmojiModal onEmojiSelected={(emoji) => {}} />;

Props

Prop nameDescriptionTypeRequiredDefault
onEmojiSelectedFunction called when the user presses one of the emojis shownfunctiontrue
onPressOutsideFunction called when the user taps outside of the emoji picker regionfunctionfalse
columnsHow many columns of emojis to render in the gridnumberfalse7
localizedCategoriesCustomize the labels for each categoryArrayfalse['Smileys & Emotion', 'People & Body', 'Animals & Nature', 'Food & Drink', 'Activities', 'Travel & Places', 'Objects', 'Symbols', 'Flags']
emojiSizeCustomize the size of each emoji, in pixelsnumberfalse32
emojiStyleCustom style for each emojiTextStylefalse
headerStyleCustom style for the label for each categoryTextStylefalse
scrollStyleCustom style for the FlatList with the grid of emojisViewStylefalse
searchStyleCustom style for the search TextInputViewStylefalse
shortcutColorColor for inactive category shortcutscolorfalse#bcbcbc
activeShortcutColorColor for the active category shortcutcolorfalse#0c0c0c
containerStyleCustom style for the "box" in the centerViewStylefalse
backgroundStyleCustom style for the background of the modalViewStylefalse
modalStyleCustom style for top-level containerViewStylefalse

Support us!

This library was created for Manyverse and we're very thankful for our backers on OpenCollective, and we need more donations! :pray:

License

MIT