Universal emoji database used by Wedgies. A near drop-in replacement for gemoji with better data, plus perfectly matched CSS display and emoji picker assets for front and back end harmony. Built off of emoji-data
We go front, we go back, we go inside-out, and then, we go front and back. For emoji.
$ npm install wemoji
var wemoji =wemojiname'dragon'
emoji: '🐉'platforms: 'tw' 'a' 'g'description: 'DRAGON'name: 'dragon'css: 'dragon'category: 'animal'
emoji: '🏩'platforms: 'tw' 'a' 'g'description: 'LOVE HOTEL'name: 'love_hotel'css: 'love_hotel'category: 'travel'
You can install the front end assets using bower:
$ bower install wemoji-assets
If you don't like bower, you can just grab them from our git repository.
Just include the
emoji.css and one of
wemoji-a.css. Each corresponds to twitter, google, and apple depending on your choice. There is also an HTML file so you can easily preview each set.
There is now also a version of the CSS that uses external assets from the emoji-data project. The files are called
wemoji-ext-a.css respectively. You can define the image paths that the CSS points
config.json per platform. We don't copy the images into dist for you though, so you'll need to pull them out of emoji-data yourself. For example, with the default
config.json settings, and if you just want to use the twitter emoji, try something like this:
mkdir -p dist/img/emoji-twcp -R emoji-data/img-twitter-64/* dist/img/emoji-tw
The markup that we use with this css is:
You can create the proper CSS class name by prepending
emoji- to the 'css' field of wemoji. If you use emoji-text, you can do that easily like this:
var emojiText =var util =emojiText
The text inside the span ensures that the meaning of the emoji can be seen by a screen reader or text based browser. The emoji class will hide it away for graphical browsers.
We use emoji-data as a submodule, so make sure you check out and initial the submodule prior to trying a rebuild.
$ git clone$ git submodule init$ git submodule update$ npm install$ grunt build
When we decided to write emoji support into our platform we were inspired by lots of great projects such as twemoji, emojify, and emoji-data. If we put them together, we could have a complete front and back end solution. But there was one little problem - there were slight differences in each platform that made them hard to combine without a lot of little hacks. We also wanted to support a universal set of emoji that had glyphs not in github, so gemoji was out.
We looked at each and decided that emoji-data had the nicest and most complete data, so that is what we decided to start with and build out everything else we needed: