Socket
Book a DemoInstallSign in
Socket

lightweight-emoji-picker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightweight-emoji-picker

Lightweight emoji picker built on js.js

0.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

npm version License

Lightweight emoji picker

This emoji picker has only what you need, and it's size wights less than 250KB including styles and the icons. This picker uses the emojilib from muan: https://github.com/muan/emojilib

Preview

Demo

Usage

With npm

npm install lightweight-emoji-picker --save

Without npm

Download the dist/picker.js file from this repository and load it into your website.

Setup

var picker=new EmojiPicker(TargetEl: HTMLNode, Callback: Function, [Language: string, [recommendedEmojis: Array]]);
  • TargetEl: HTML Element to display the picker at, will append the picker to the DOM after this element, and position it next to the element by absolute positioning

  • Calback: A function that is called when an emoji is choosen. Will receive one parameter with the following data:

    {
      category: (String)categoryName,
      char: (String)the Character,
      keywords: (Array)Array with keywords
    }
    
  • Language: Language to display phrases. Possible values en and de

  • recommendedEmojis: An array with emojis to display in the special "recommended" category at the top of emoji list. Values have to be the keys from the emoji lib: https://github.com/muan/emojilib/blob/master/emojis.json

Showing / Hiding the picker

There a three methods you can use:

picker.toggle(); // toggles the visible state of the picker
picker.show(); // shows the picker
picker.hide(); // hides the picker

FAQs

Package last updated on 19 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.