![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
emoji-button
Advanced tools
Vanilla JavaScript emoji picker 😎
https://joeattardi.github.io/emoji-button
npm install --save emoji-button
import EmojiButton from 'emoji-button';
const button = document.querySelector('#emoji-button');
const picker = new EmojiButton();
picker.on('emoji', emoji => {
document.querySelector('input').value += emoji;
});
button.addEventListener('click', () => {
picker.pickerVisible ? picker.hidePicker() : picker.showPicker(button);
});
new EmojiButton(options)
Creates an Emoji Button emoji picker.
position
: The position to display the picker relative to the reference element. Valid values are:
auto
auto-start
auto-end
top
top-start
top-end
right
right-start
right-end
bottom
bottom-start
bottom-end
left
left-start
left-end
rootElement
: The root DOM node to attach the picker to. Defaults to the body if not passed in.
autoHide
: (boolean, default: true
) Whether or not the picker should automatically be hidden when an emoji is clicked.
autoFocusSearch
: (boolean: default: true
) Whether or not to auto-focus the search field when the picker is shown.
i18n
: An object containing localized messages to display in the UI. The values and their defaults are as follows:
{
search: 'Search',
categories: {
recents: 'Recently Used',
smileys: 'Smileys & People',
animals: 'Animals & Nature',
food: 'Food & Drink',
activities: 'Activities',
travel: 'Travel & Places',
objects: 'Objects',
symbols: 'Symbols',
flags: 'Flags'
},
notFound: 'No emojis found'
}
showPicker(referenceElement)
Shows the picker, positioning it relative to the given reference element. The reference element is usually the button or other element that was clicked to open the picker.
hidePicker()
Hides the picker.
pickerVisible
(property)Will be true
if the picker is currently visible, and false
if not.
on(event, callback)
Adds an event listener. Currently there is only one event:
emoji
: Fired when an emoji is picked. The callback is called with a single argument, the emoji character that was picked.The easiest way to hack on Emoji Button is to use the examples page.
git clone https://github.com/joeattardi/emoji-button.git
npm install
npm link
npm run build:watch
examples
subdirectorynpm install
npm link emoji-button
npm start
FAQs
Vanilla JavaScript emoji picker
The npm package emoji-button receives a total of 99 weekly downloads. As such, emoji-button popularity was classified as not popular.
We found that emoji-button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.