emoji-selector
v1.0.4
Published
A HTML custom element implementing the `<emoji-selector>` tag.
Downloads
50
Maintainers
Readme
emoji-selector
A HTML custom element implementing the <emoji-selector>
tag.
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>