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> </div>
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.
Be First to Comment