Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-emojione-menu

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-emojione-menu

Emoji menu with React and emojione

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React EmojiOne

Usage

Install from npm

$ npm i -S react-emojione-menu emojione

Basic Usage with png images

import EmojiMenu from 'react-emojione-menu';

function sendEmoji(emoji) {
  send.emoji(emoji);
}

function MyComponent() {
  return (
    <EmojiMenu sendEmoji={sendEmoji} />
  );
}

See emojione's documentation for rendering emojis from strings.

Advanced Usage with svg sprites

import EmojiMenu from 'react-emojione-menu';
import emojione from 'emojione';

emojione.imageType = 'svg';
emojione.sprites = true;
emojione.imagePathSVGSprites = '/pathToSpriteSheet.svg';

function sendEmoji(emoji) {
  send.emoji(emoji);
}

function MyComponent() {
  return (
    <EmojiMenu
      sendEmoji={sendEmoji}
      svgSprites="/emojione.svg"
    />
  );
}

See emojione's documentation on using svg sprites and download link for the sprites.

Installation

src

Install node_modules used in ./src:

$ npm i

Compile ./src with Babel:

$ npm run compile

examples

Install node_modules used in ./examples:

$ cd examples && npm i

Development

src

To watch for changes in ./src run:

$ npm run watch

Babel will compile ./src on changes.

examples

To start the webpack server run:

$ cd examples && npm run start

Webpack wil compile on changes in ./examples/src.

Contributing

If you want to help with the development of this module and need to test your changes with the examples you can import <EmojiMenu /> directly from ./dist. Be sure to run npm run compile first.

'./examples/src/app.js'

// Change this
import EmojiMenu from 'react-emojione-menu';

// to this
import EmojiMenu from '../../dist/index';

License

This project is licensed under the terms of the MIT license.

Keywords

FAQs

Package last updated on 21 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc