0.1.2 • Published 1 year ago

@creaditor/emoji-picker-web-component v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Creaditor Emoji Picker

Keep the following in mind

this package use emoji-picker-react

Installation

Node package

npm i @creaditor/emoji-picker-web-component

Include the module in your application

import "@creaditor/emoji-picker-web-component"

Add the tag in as dom element

<cdtr-emoji-picker></cdtr-emoji-picker>

Example:

  const onEmojiClick = (event, emojiObject) => {
    setChosenEmoji(emojiObject);
  };
const emojiPicker = document.createElement("cdtr-emoji-picker");
emojiPicker.onEmojiClick = (event, emojiObject) => {
  const span = document.createElement("span");
  span.innerHTML = emojiObject.emoji;
  document.getElementById("block").appendChild(span);
};

document.getElementById("block").appendChild(emojiPicker);

Publish

Please build using npm run build

and then run npm publish

Accepted props

NameTypeDefault ValueRequired?Description
onEmojiClickFunctionundefinedYesCallback to run when clicking an emoji.
preloadBooleanfalseNoIndicates whether all emojis images, should be preloaded, or only when showing each category.
skinTonestringneutralNoDecides the default skit tone for supported emojis.
disableAutoFocusbooleanfalseNoDisables autofocus of the search bar. Useful for safari-iphone devices which zoom in to focused inputs.
disableSearchBarbooleanfalseNoDisables the search bar and the skin tone picker altogether.
disableSkinTonePickerbooleanfalseNoDisables the skin tone picker.
pickerStyleObjectundefinedNoOverrides style of the component.
groupNamesObjectundefinedNoSpecifies alternative category names to use. See Internationalization section.
groupVisibilityObjectundefinedNoSpecifies group names to be disabled.
nativeBooleanfalseNoLoads system emojis instead of Apple Emoji pngs
searchPlaceholderstringnullNoDecides the default placeholder for the search input