How to use emoji-picker-element - 1 common examples

To help you get started, weā€™ve selected a few emoji-picker-element examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daud-io / daud / Game.Engine / wwwroot / src / controls.ts View on Github external
import Cookies from "js-cookie";
import nipplejs from "nipplejs";
import { Settings } from "./settings";
import { Ship } from "./models/ship";
import { Picker } from "emoji-picker-element";

const emojiContainer = document.getElementById("emoji-container");
const picker = new Picker();
emojiContainer.appendChild(picker);
picker.addEventListener("emoji-click", (e) => {
    Cookies.set("emoji", e.detail.unicode);
    emojiTrigger.innerText = e.detail.unicode;
    Controls.emoji = e.detail.unicode;
    emojiContainer.classList.remove("open");
});

const secretShips = ["ship_secret", "ship_zed"];

const autofCon = document.getElementById("autofireContainer");
const autofTgg = document.getElementById("autofireToggle");
const emojiTrigger = document.getElementById("emoji-trigger");

document.addEventListener("click", (event) => {
    if (event.target == emojiTrigger) emojiContainer.classList.toggle("open");

emoji-picker-element

Lightweight emoji picker distributed as a web component

Apache-2.0
Latest version published 15 days ago

Package Health Score

83 / 100
Full package analysis

Popular emoji-picker-element functions