A HTML custom element implementing the <emoji-selector>
tag.
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");
<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>