Emojis are a fun way to add a little life to any app you are building, but a problem you might encounter is that they look different on iOS, Android, Windows, and macOS.
Emoji’s are part of the Unicode Standard, and as of March 2020, there are 3,304 total, with more added on each release. Twitter has put together a fantastic free JavaScript library, Twemoji, which provides a standardized bundle of emoji in SVG and PNG formats.
Head over to Twemoji’s GitHub page and follow the usage instructions. For this example, I am adding the CDN link directly to my index.html file at the root of my angular project.
Using the Angular CLI, add a new pipe to your project and add the following code to it.
ng generate pipe Emoji
Lets break down what is happening here,
To see a full list of emoji’s and their Codepoints take a look at https://emojipedia.org/twitter/.
As part of building Noviggo, we are using emojis to represent the confidence one has in an idea as they are thinking about it. We are super excited with the results we have gotten after using Twemoji and look forward to leveraging them more for future projects.