Skip to content

A minimal, no library, no framework HTML custom element that lets you pick and search emojis for use

Notifications You must be signed in to change notification settings

Kiricon/emoji-selector

Repository files navigation

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>

About

A minimal, no library, no framework HTML custom element that lets you pick and search emojis for use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published