@falcon-webchat/web-emojies
v1.0.10
Published
Emoji picker component for react applications
Downloads
14
Readme
neura-emoji-panel
What you need to know before installing?
- Version 1.0.2 uses React hooks, which means you need to use React 16.8 or higher.
- Unlike previous versions, this version uses Apple emojis.
- V3 does not support SSR. The assumption is that you mount it only after user interaction in the browser. SSR support may be added in the future.
Installation
npm i neura-emoji-panel
Or
yarn add neura-emoji-panel
New v1.0.2 features
- Larger emoji library.
- Apple emojis instead of emojione.
- Recently used emojis support.
- Faster load time, improved performance.
- Ability to set default skin tone.
Usage
neura-emoji-panel comes ready to use out of the box, zero conf needed. The only thing you need to do is add your own emoji click callback.
import React, { useState } from 'react';
import Picker from 'neura-emoji-panel';
const App = () => {
const [chosenEmoji, setChosenEmoji] = useState(null);
const onEmojiClick = (event, emojiObject) => {
setChosenEmoji(emojiObject);
};
return (
<div>
{chosenEmoji ? (
<span>You chose: {chosenEmoji.emoji}</span>
) : (
<span>No emoji Chosen</span>
)}
<Picker onEmojiClick={onEmojiClick} />
</div>
);
};
UI Customizations
In general, UI customizations can be done directly via CSS. Descriptive classnames were added in order for you to be able to easily target whatever it is you want to change, and the markup is guaranteed to stay unchanged until the next major version (4).