Static export of platform-specific metadata for unicode emojis. ๐๏ธ
npm i emoji-platform-dataimport { byEmoji, byTitle } from "emoji-platform-data";
console.log(byEmoji["๐"]);
console.log(byTitle.SparklingHeart);
/*
{
android: { "keywords": ["bday", "birthday", "bling", ...] },
discord: { "name": "sparkling_heart", ... },
emoji: "๐",
emojiMart: { "id": "sparkling_heart", ... },
emojipedia: { "currentCldrName": "Sparkling Heart", ... },
fluemoji: { "cldr": "sparkling heart", ... },
gemoji: { "description": "sparkling heart", ... },
gnome: { "name": "sparkling heart", ... },
joypixels: { "name": "sparkling_heart", ... },
macos: { "appleName": "heart with stars", ... },
slack: { "name": "sparkling_heart", ... },
twemoji: { "description": "Sparkling heart", ... },
wechat: { "keywords": ["twinkle", "twinkling", "้ชไบฎ็ๅฟ", ...], ... },
windows: { "name": "sparkling heart", ... },
...
}
*/The conglomerate emoji-platform-data package provides straightforward records of emoji data across common platforms:
byEmojitakes a glyph as any platform writes it, with or without its U+FE0F:byEmoji["โ๏ธ"]andbyEmoji["โ"]are the same entry.byTitletakes a PascalCase Emojipedia title, andemoji-platform-data/byTitleexports each one separately for smaller bundles.
emoji-platform-data combines emoji data from a collection of well-known projects.
Each project's data is also published as its own package, for consumers who only need one source:
| Package | Source | Exports |
|---|---|---|
emoji-platform-data |
All of the below | byEmoji and byTitle of combined EmojiPlatformData |
@emoji-platform-data/android |
Android (Gboard) | byEmoji and byTitle of AndroidItem |
@emoji-platform-data/discord |
Discord | byEmoji and byTitle of DiscordItem |
@emoji-platform-data/emoji-mart |
emoji-mart | byEmoji and byTitle of EmojiMartItem |
@emoji-platform-data/emojipedia |
Emojipedia | byEmoji and byTitle of EmojipediaItem |
@emoji-platform-data/fluemoji |
Fluent UI / Windows | byEmoji and byTitle of FluemojiItem |
@emoji-platform-data/gemoji |
Gemoji | byEmoji and byTitle of GemojiItem |
@emoji-platform-data/gnome |
GNOME | byEmoji and byTitle of GnomeItem |
@emoji-platform-data/joypixels |
JoyPixels / Zoom | byEmoji and byTitle of JoyPixelsItem |
@emoji-platform-data/macos |
macOS | byEmoji and byTitle of MacOSItem |
@emoji-platform-data/slack |
Slack | byEmoji and byTitle of SlackItem |
@emoji-platform-data/twemoji |
Twemoji | byEmoji and byTitle of TwemojiItem |
@emoji-platform-data/wechat |
byEmoji and byTitle of WeChatItem |
|
@emoji-platform-data/windows |
Windows | byEmoji and byTitle of WindowsItem |
@emoji-platform-data/generator |
- | APIs that generate the data packages above |
The data packages are only static JSON and types, with no runtime dependencies. Each emoji supported in at least one of those projects is stored by its emoji glyph and Emojipedia title.
๐ This documentation uses the excellent emojipedia.org as a source of information.
An emoji is a small image represented by a glyph in text. The Unicode Standard defines which characters in text map to which emojis, as well as how combinations of emoji characters combine to more emojis. For example:
- ๐ฅ (
fire) is represented by the string code U+1F525 - โค๏ธ (
red heart) is represented by the string codes: U+2764 U+FE0F - โค๏ธโ๐ฅ (
heart on fire) is represented by โค๏ธ + a "zero-width joiner" + ๐ฅ: U+2764 U+FE0F U+200D U+1F525
๐ก Emojis are not the same as their predecessors, emoticons. Emoticons are symbols that combine traditional text characters, such as
:)for "smiley" and(โฏยฐโกยฐ)โฏ๏ธต โปโโปfor "table flip".
The formal name, or ๐ identity, for each emoji is standardized in Unicode. However, emojis may be associated with multiple names across different specifications. For example, ๐ฟ can be referred to either as "Angry Face with Horns" or "Imp" depending on the source.
In addition to their name(s), emojis commonly have related terms, or ๐ keywords, associated with them. These keywords are not standardized and may vary drastically across the various chat applications, operating systems, and shared open source libraries that each separately implement emoji pickers.
For example, ๐ (octopus) is defined in emoji-mart@5.5.2 -used by Bluesky and other projects- with ["animal", "creature", "ocean", "sea", "nature", "beach"].
This project attempts to bring together the ๐ identity and ๐ keywords across several sources of emoji data, each defined as a "platform". Platforms include:
- Chat platforms (Discord, Slack, ...)
- Operating systems and desktop environments (macOS, Windows, GNOME, ...)
- Open source libraries used by platforms (
emoji-mart, ...)
Any grouping of emoji ๐ identity and ๐ keywords used by consumers today can qualify as a platform.
๐ If your platform isn't included in
emoji-platform-dataand doesn't have a trackingplatform-supportissue, please file an issue asking for it!
This is useful if you're looking to see the metadata supported for emojis in each of those platforms. For example, if you wanted to determine the keywords associated with any emoji, this would let you accumulate all the keywords across the supported platforms.
Also, isn't this just cool?! Look how different each platform's understanding of emojis is! Even just the keywords associated with each emoji are so different across platforms! ๐คฏ
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md ๐๏ธ
Benjamin Swerdlow ๐ค |
Dario Vladoviฤ ๐ค ๐ |
Gilles Piou ๐ป |
Josh Goldberg โจ ๐ป ๐ ๐ ๐ค ๐ ๐ง ๐ ๐ง ๐ |
Maddy Miller ๐ |