A minimal, no library, no framework HTML custom element that lets you pick and search emojis for use
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
IEmojis.d.ts
IEmojis.js
IEmojis.ts
README.md
capture.gif
emoji-selector.bundle.js
emoji-selector.d.ts
emoji-selector.js
emoji-selector.ts
emojis.d.ts
emojis.js
emojis.ts
index.html
package-lock.json
package.json
tsconfig.json
webpack.config.js

README.md

emoji-selector

A HTML custom element implementing the <emoji-selector> tag.

emoji-selector in action

Setup

Installation

npm i emoji-selector

<script src="node_modules/emoji-selector/emoji-selector.bundle.js"></script>

or if you're bundling

import "emoji-selector";
// or
require("emoji-selector");

Usage

    <emoji-selector></emoji-selector>
    <script>
        let emojiSelector = document.querySelector('emoji-selector');

        // You can assign a function to "emojiSelected"
        // that will will be called every time an emoji is select
        emojiSelector.emojiSelected = (char) => {
            console.log(char);
            emojiSelector.close();
        };
    </script>