Vanilla javascript emoji picker

Overview

FG Emoji Picker - Emoji picker created with vanilla javascript

This is the simplest to use emoji picker built with vanilla javascript.

Benefits:

  • It is only one .js file without css or other files
  • There is no jQuery or other libraries
  • Simplicity of usage
  • Multiple textareas and triggers
  • Draggable emoji picker container

Initialize

Initialze plugin with new EmojiPicker({});

Options

  • Trigger - must be an array of objects. Inside object there are two properties. First is selector, and second - insertInto method to define where emoji going to be inserted. If there are multiple 'textarea's - you can provide array of selectors as well. Watch example below.
  • Close button - closeButton method can be true of false depending on whether you want close button on emoji picker or not.
  • specialButtons - takes color code to change special (move and close) button colors.
new EmojiPicker({
    trigger: [
        {
            selector: '.first-btn',
            insertInto: ['.one', '.two'] // If there is only one '.selector', than it can be used without array
        },
        {
            selector: '.second-btn',
            insertInto: '.two'
        }
    ],
    closeButton: true,
    specialButtons: 'green' // #008000, rgba(0, 128, 0);
});
Comments
  • A better way to close the emoji picker ?

    A better way to close the emoji picker ?

    The only way to close it seems:

    • ESC keypress
    • choose an emoji

    There is no "X" close button. Nor the click on blank document closes it.

    Any way to add a better way to close it ?

    opened by yarekc 3
  • Display multiple emoji in a contentable at once

    Display multiple emoji in a contentable at once

    Hi, thanks for your plugin. It’s the only one I found on the net that meets my needs. However I encounter some problems: I created a contentditable that works with the emoji, but each time I click on the "enter" key the emoji that follow the action multiply according to the number "enter". I wish you could help me. Thanks in advance.

    opened by BAALC16 2
  • Insert emoji at cursor location

    Insert emoji at cursor location

    Hello @woody180! Thank you for this awesome emoji picker! Amazing job! It's very useful if you don't won't to hide the input field. I have a question, is this possible to insert the emoji at cursor position? Thank you!

    opened by Dedrago 2
  • Multiply textarea on same page

    Multiply textarea on same page

    Hi Woody180, I love this emoji picker, the only missing feature for me, is the possibility to have multiply emoji pickers on the same page. Is it possible to make the emoji picker uses the nearest textarea from the clicked trigger?

    I have tried different methods but couldn't get it to work. Do you know if there is a solution?

    opened by Zimmerlein 1
  • z-index problem with Boostrap 5 Offcanvas

    z-index problem with Boostrap 5 Offcanvas

    Hi, thank you it's a very beautiful emoji picker, but for using it inside a Bootstrap 5 "Offcanvas" element you have to increase the z-index from 999 to upper than 1050.

    I hope that will help.

    opened by sti2dSinBastia 1
  • Unable to insert only emoji

    Unable to insert only emoji

    new FgEmojiPicker({ trigger: ['button'], position: ['bottom', 'right'], preFetch: true, emit(obj, triggerElement) { document.querySelector('textarea').value += obj.emoji; } });

    opened by Asifkrishaweb 1
  • initialize twice

    initialize twice

    Hello. Thanks for the picker; I like a lot! I have a question; I'm trying to insert two differents (for 2 different textareas) in the same page but it doesn't work and I've no console errors.

    const emojiPickerReply = new FgEmojiPicker(opts) const emojiPicker = new FgEmojiPicker(opts)

    Do you know what's going on?

    Thanks in advance,

    opened by ddaniel-gomez 1
  • Option to keep the emoji picker open after emit an emoji

    Option to keep the emoji picker open after emit an emoji

    This is pretty easy to to, just add an option like removeOnSelection defaults to true to keep the original behavior. And make an if-statement in the emitEmoji function:

    if(this.removeOnSelection)
        picker.remove();
    

    One of my testers mentioned that most people use multiple emojis and in my opinion it makes sens to have this option if wished. And thanks a lot for the work on this picker.

    opened by Bissel 1
  • Now, can disable drag, enable dark mode & give custom popup position.

    Now, can disable drag, enable dark mode & give custom popup position.

    Hi, In this pull request. We can now disable the drag button. image

    We can also give pop up position to our picker by adding it to the present position. image

    Dark theme is here. image The color are not cool but I can change the colors as you dark color palatte.

    opened by AnonymousXC 0
  • Keywords in JSON-file are not used for search

    Keywords in JSON-file are not used for search

    The search function only uses the Emoji name, not the keywords. I added an extra attribute "data-keywords" (line 181 in fgEmojiPicker.js) then i added the data-keywords attribute to the LI-object in line 619, joining the keywords array and preserving the keywords from the description: data-keywords="${item.description.toLowerCase()} ${item.keywords.join(" ").toLowerCase()}"

    opened by fantastic-coder 0
  • added option to load emoji

    added option to load emoji

    added option called preFetch when true emoji will load when constructor is called and then use that data for to show emoji every time insted of loading emoji on every click. when false json well load only on first click and then use same data to to show emoji every time insted of loading emoji on every click.

    either true or false prevent json load on every click

    opened by RahulChand028 0
  • Internet Explorer 11

    Internet Explorer 11

    Hi,

    Thanks for this beautiful emoji picker, it matches all my needs.

    However, I know it's always hard to make things work for IE, and I know this is supposed to be deprecated this year, but it would have been great just to hide the component or display an alert if the users is using IE 11, to avoid errors.

    opened by piwel 0
Releases(v2.0.1)
Easily add emoji support to your website! Replace keywords with emoji's :yum:

Emoji-Parser.js ?? A emoji parser to easily add emoji support to your website Show your support! Features: Use's the same style GitHub does! TON's of

Marketing Pipeline 13 Sep 9, 2022
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr Colr Pickr, a vanilla JavaScript color picking component built with SVGs, with features like saving colors. Similar design to the chrome-de

TEK 27 Jun 27, 2022
Tool Cool Color Picker is a color picker library written in typescript and using web component technologies.

Tool Cool Color Picker Tool Cool Color Picker is a color picker library written in typescript and using web component technologies. Check out the demo

Tool Cool 13 Oct 23, 2022
Simple date and time picker in vanilla javascript

simplepicker Simple datetime picker in vanilla javascript. This project is mostly based on material-datetime-picker, but without it relying on externa

Priyank Patel 51 Jul 18, 2022
Provides intellisense, search and preview of emoji

Features Suggest emoji names after typing : or / (can be changed) Browse emojis by category Fuzzy search emojis Intellisense emojiIntellSense.language

Xiaoqian Zhang 5 Oct 15, 2022
Emojion - Create and share images combined emoji and text

?? Emojion Emojion is a web application to create and share images combined an emoji and text. Your contribution is welcome! Concepts Simple Since the

ajfAfg 4 Oct 14, 2022
A Chromium extension that enables users to use customizable :emoji: on Facebook/Facebook Messenger.

:emoji: for Messenger A Chromium extension that enables users to use customizable :emoji: on Facebook/Facebook Messenger. Install Download the extensi

null 4 Aug 31, 2022
A button to POST an emoji to an endpoint.

<open-heart> A button for the Open Heart Protocol. ?? Highly experimental. Tag a version to avoid unexpected changes. Usage <!-- Include `OpenHeartEle

ddddddddʣzzz 20 Nov 3, 2022
A web app to post emoji implemented in connect-go and connect-web.

emotter Emotter is an app to post and share single emoji. This is an example app of connect. Example https://emotter.syumai.com API: Cloud Run Web cli

syumai 11 Oct 30, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.

vanilla-datetimerange-picker Overview. A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js,

null 22 Dec 6, 2022
A simple color picker application written in pure JavaScript, for modern browsers.

Color Picker A simple color picker application written in pure JavaScript, for modern browsers. Has support for touch events. Touchy… touchy… Demo and

Taufik Nurrohman 207 Dec 14, 2022
Fushra Distro Picker

Jump right into linux without the hassle of researching a distro! This webapp will narrow down the selection, allowing you to find the perfect distro for you

null 4 Mar 11, 2022
📆 The modern, open source "Airbnb style" date picker.

Date Picker A pretty, modern date picker. Coming soon. ?? Get Started wip wip ?? Testing pnpm test ?? Changelog Please see our releases page for more

Open Web Foundation 8 Oct 11, 2022
Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.

Bootstrap Colorpicker Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4. THIS PROJECT IS NOT MAINTAINED ANYMORE. After almost 10

Javi Aguilar 1.4k Dec 22, 2022
Flat and simple color-picker library. No dependencies, no jquery.

Flat and simple color-picker Fully Featured demo Features Simple: The interface is straight forward and easy to use. Practical: Multiple color represe

Ivan Matveev 15 Nov 14, 2022
Turn an HTML input box to a duration picker, without jQuery

html-duration-picker.js html-duration-picker.js is a very tiny JS library used for transforming a native HTML text input into a duration picker. The a

Dan Chif 27 Oct 19, 2022
A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

Clock Timepicker Plugin for jQuery See a demo here A free jQuery Plug-in to select the time with a clock inspired by the Android time picker. This plu

Andy 51 Dec 22, 2022
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin

Zebra Datepicker A super-lightweight, highly configurable, cross-browser date/time picker jQuery plugin Zebra_Datepicker is a small yet and highly con

Stefan Gabos 391 Dec 29, 2022