Socket
Book a DemoInstallSign in
Socket

react-emoji-palette

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-emoji-palette

A React clone of Twitter's emoji picker, supporting native rendering & Twemoji

latest
npmnpm
Version
1.0.0-alpha5
Version published
Maintainers
1
Created
Source

react-emoji-palette

A React clone of Twitter's emoji picker, supporting both native rendering and Twemoji. This component is unfinished and should be considered early alpha.

Props

  • onEmojiSelect (function, required)
    • A callback function to be called when an emoji is pressed
  • mode (string - NATIVE, TWEMOJI, NATIVE by default)
    • The mode to use to render emoji. Selecting native will use unicode and Twemoji will use images hosted remotely by Twitter.
  • maxUnicodeVersion (number, 8 by default)
    • The maximum unicode version you want to display emoji from. At the time of writing, latest Mac OS supports (most of) 8 and latest iOS supports 9. This can be set to Infinity if using Twemoji.
  • displayZeroWidthJoins (boolean, false by default)
    • Even though Mac OS supports Unicode 8, it is missing some characters which use zero-width-joins. Set this prop to false to disable emoji formed using zwj sequences.

Usage

import React from 'react';
import EmojiPalette, { MODES } from 'react-emoji-palette';

const MyComponent = () => (
    <EmojiPalette
        onEmojiSelect={ (emoji) => console.log(emoji) } // required
        mode={MODES.TWEMOJI} // optional, default is NATIVE
        maxUnicodeVersion={9} // optional, default is 8
        displayZeroWidthJoins={true} // optional, default is false
    />
);

Missing features:

  • No recent emoji section
  • Unable to scroll between categories (see Twitter's picker)
  • Category bar does not respect mode (native vs. twemoji)
  • More

Important resources for working with emoji

Keywords

emoji

FAQs

Package last updated on 28 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.