Skip to content

raphaelhovsepyan/react-twemoji

 
 

Repository files navigation

react-twemoji

A simple React wrapper for Twemoji. It calls twemoji.parse() to convert emoji characters to Twemoji images.

Install

npm install react-twemoji

Usage

Simply use it to wrap your emotional content.

import Twemoji from 'react-twemoji';

<Twemoji>
  <p>😂<span>😉</span></p>
</Twemoji>

It outputs following HTML to DOM,

<div>
  <p>
    <img draggable="false" class="emoji" alt="😂" src="https://twemoji.maxcdn.com/2/72x72/1f602.png">
    <span>
      <img draggable="false" class="emoji" alt="😉" src="https://twemoji.maxcdn.com/2/72x72/1f609.png">
    </span>
  </p>
</div>

Run example

npm run example

then open http://localhost:8080/

Development

Lint

npm run lint

Test

npm run test

Build

npm run build

About

A React wrapper for Twemoji

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.8%
  • HTML 4.2%