An Emoji Switcher Like Discord Style


Emoji Switcher is a Discord-like emoji that reacts when you hover over an item or tap on an item. Vanilla JS emoji converter that allows users to switch between emoji on swipe and tap as seen on Discord.

javascript emoji picker, vanilla emoji picker, text box with emoji picker, jquery emoji picker textarea, emoji in html input, angular emoji picker

How to make use of it:

1. Add the preliminary emoji to the web page.

<div class="section">
  <button id="emoji-btn">๐Ÿ˜€</button>

2. Style the emoji switcher in CSS.

button#emoji-btn {
  border: none;
  font-size: 5rem;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(25px);
  border-radius: 10px;
  filter: grayscale();
  padding: 15px;
  transition: transform 0.2s ease, filter 0.2s ease;

button#emoji-btn:hover {
  transform: scale(1.3);
  filter: grayscale(0);

3. Add an array of emoji to the emoji switcher.

const emojis = 
  ["๐Ÿ˜†", "๐Ÿ˜…", "๐Ÿคฃ", "๐Ÿ˜‚", "๐Ÿ˜€", "๐Ÿค‘", "๐Ÿคจ", "๐Ÿ™‚",
   "๐Ÿ˜Š", "๐Ÿ˜—", "๐Ÿ˜›", "๐Ÿ˜", "๐Ÿคฅ", "๐Ÿ˜ด", "๐Ÿฅบ", "๐Ÿ˜ง",
   "๐Ÿค—", "๐Ÿคฉ", "๐Ÿ˜Ž", "๐Ÿฅณ", "๐Ÿ˜", "๐Ÿ˜ฑ", "๐Ÿค“", "๐Ÿ˜ท",
   "๐Ÿฅด", "๐Ÿ˜ณ", "๐Ÿคฏ", "๐Ÿคซ", "๐Ÿค‘", "๐Ÿ˜ช", "๐Ÿ˜ด", "๐Ÿ˜ต"

4. Enable the button to modify between emoji on hover & click on.

const btn = document.getElementById('emoji-btn');
btn.addEventListener('mouseover', () => {
  btn.innerText = emojis[Math.floor(Math.random() * emojis.length)];
btn.addEventListener('click', () => {
  btn.innerText = emojis[Math.floor(Math.random() * emojis.length)];

Discord Style Emoji Switcher, Emoji Switcher Plugin/Github, best jquery emoji plugins

See Demo And Download

Official Website(piyushL337): Click Here

This superior jQuery/javascript plugin is developed by piyushL337. For extra Advanced Usages, please go to the official website.