KeyboardKit defines an emoji type with a lot of information.


KeyboardKit provides you with an Emoji type that has unicode and emoji information, an emoji localization engine, etc.

KeyboardKit Pro unlocks an emoji keyboard, as well as emoji categories, keyboards, skintones, version information, etc. Information about Pro features can be found at the end of this article.

Emojis namespace

KeyboardKit has an Emojis namespace that contains emoji-related types and views. KeyboardKit Pro adds more features to this namespace.


KeyboardKit has an Emoji struct that lets you work with emojis in a more structured way:

let emoji = Emoji("πŸ˜€")

This type provides you with a bunch of information, such as the emoji’s unique unicode-based identifier and name, localized name etc.:

let emoji = Emoji("πŸ˜€")
emoji.unicodeIdentifier  // \\N{GRINNING FACE}
emoji.unicodeName        // Grinning Face

Emojis can be localized with the localization files found in the Sources/Resources folder. Emojis that lack a localized name will use Emoji/unicodeName as a fallback.

let emoji = Emoji("πŸ˜€")
emoji.localizedName(for: .english)  // Grinning Face
emoji.localizedName(for: .swedish)  // Leende Ansikte

To localize emojis for a locale, add translations to the correct Localizable.strings file on this format:

/* [πŸ˜€] */ "Emoji.GrinningFace" = "Grinning Face";
/* [πŸ˜ƒ] */ "Emoji.SmilingFaceWithOpenMouth" = "Smiling Face with Open Mouth";

Emoji localization is a major undertaking and will therefore have to be a community effort.

String & Character Extensions

KeyboardKit has String and Character extensions to detect emojis, for instance:

"Hello!".containsEmoji          // false
"Hello! πŸ‘‹".containsEmoji       // true
"Hello! πŸ‘‹".containsOnlyEmojis  // false
"πŸ‘‹".containsOnlyEmojis         // true
"Hello! πŸ‘‹πŸ˜€".emojis            // ["πŸ‘‹", "πŸ˜€"]
"Hello! πŸ‘‹πŸ˜€".emojiString       // "πŸ‘‹πŸ˜€"
"🫸🫷".isSingleEmoji            // false
"πŸ‘".isSingleEmoji              // true

These extensions make it easier to make emoji-based decisions for text values.

πŸ‘‘ Pro features

KeyboardKit Pro unlocks an emoji keyboard, categories, keyboards, skintones, version info, etc.

Emoji Keyboard

KeyboardKit Pro unlocks an EmojiKeyboard that mimics the native emoji keyboard.

Emoji Keyboard

The keyboard uses a bunch of views that are also unlocked by KeyboardKit Pro, such as the Emojis.Grid, as well as titles, menus, etc. You can use these views as standalone components as well.

KeyboardKit Pro unlocks an Emojis.MostRecentProvider and replaces StandardKeyboardActionHandler with a ProKeyboardActionHandler that automatically registers emojis as you use them in the keyboard.

Emoji Power-Ups

KeyboardKit Pro unlocks additional emoji information and capabilities.

Emoji Categories

KeyboardKit Pro unlocks an Emojis.Category enum that defines all emoji categories and their emojis:

Emojis.Category.smileys.emojis    // πŸ˜€πŸ˜ƒπŸ˜„πŸ˜πŸ˜†πŸ₯ΉπŸ˜…πŸ˜‚πŸ€£πŸ₯² ...
Emojis.Category.animals.emojis    // πŸΆπŸ±πŸ­πŸΉπŸ°πŸ¦ŠπŸ»πŸΌπŸ»β€β„οΈπŸ¨ ...

You can get a list of all available categories:

Emojis.Category.all     // [.frequent, .smileys, .animals, ...]

and use them to get a list of all available emojis:

Emoji.all     // πŸ˜€πŸ˜ƒπŸ˜„πŸ˜πŸ˜†πŸ₯ΉπŸ˜…πŸ˜‚πŸ€£πŸ₯² ...

Emoji categories are used to power the EmojiKeyboard.

Emoji Skin tones

KeyboardKit Pro unlocks additional Emoji extensions to get skin tone information:

Emoji("πŸ‘").hasSkinToneVariants      // true
Emoji("πŸš€").hasSkinToneVariants      // false
Emoji("πŸ‘").isNeutralSkinToneVariant // true
Emoji("πŸ‘πŸΏ").isNeutralSkinToneVariant // false
Emoji("πŸ‘πŸΏ").neutralSkinToneVariant   // πŸ‘
Emoji("πŸ‘").skinToneVariants         // πŸ‘πŸ‘πŸ»πŸ‘πŸΌπŸ‘πŸ½πŸ‘πŸΎπŸ‘πŸΏ
Emoji("πŸ‘").skinToneVariantActions   // The above variants as keyboard actions

Skin tones will also be used as secondary callout actions, which means that long pressing an emoji with skintones in an emoji keyboard will show an action callout.

Note that skin tones for emojis with multiple skin tone components is currently not supported, such as two persons kissing.

Emoji Versions

KeyboardKit Pro unlocks an EmojiVersion type that defines emoji versions, platform availability and included emojis, for instance:

let version = EmojiVersion.v15
version.version  // 15.0
version.iOS      // 16.4
version.macOS    // 13.3
version.tvOS     // 16.4
version.watchOS  // 9.4

You can also get the emoji version included in a certain platform version, for instance:

let version = EmojiVersion(iOS: 15.4)
version.version  // 14.0

A version specifies the emojis introduced in that version, later and older versions and emojis that were introduced in later versions:

let version = EmojiVersion.v14
version.emojis            // 🫠🫒🫣🫑πŸ«₯🫀πŸ₯Ή...
version.laterVersions     // [.v15]
version.olderVersions     // []
version.unavailableEmojis // 🫨🫸🫷πŸͺΏπŸ«ŽπŸͺΌπŸ«πŸͺ½...

This can be used to filter out unavailable emojis from the various categories, which lets the emoji keyboard only list available emojis.


The information on this page is shortened to be easier to overview. For more information about this feature, code samples, etc., please see the online documentation.