
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-emoji-selectors
Advanced tools
Simple, ready to use, and customable react emoji selector component for every react project.
Simple, ready to use, and customable react emoji selector component for every react project.
Try and custom your emoji selector here.
yarn add react-emoji-selectors
To use EmojiSelector, we recommend you to wrap your triggle element and EmojiSelector under the same tag as an example below.
This is just a simple example of EmojiSelector.
You can customize it by using component props from next section.
import React, { useState } from 'react';
import { EmojiSelector } from 'react-emoji-selectors';
function App () {
const [output, setOutput] = useState('🦁');
const [showSelector, setShowSelector] = useState(true);
return (
<div className="App">
<div>
<div onClick={() => setShowSelector(true)}>
Click {output}!
</div>
{showEmoji &&
<EmojiSelector
onClose={() => setShowSelector(false)}
output={setOutput}
/>
}
</div>
</div>
)
}
If you want responsive version for your responsive app, we recommend you to use mobile version MEmojiSelector for mobile and tablet screen size.
Of course, you can use both in one application as well.
Here is the example of mobile version.
{showEmoji &&
<MEmojiSelector
onClose={() => setShowSelector(false)}
output={setOutput}
/>
}
Use this attribute as a function to set useState variable to close the emoji selector.
functionUse to get selected emoji from selector. You can pass function through this attribute as an example below.
functionstring (emoji)The emoji selector will close after user select an emoji when this attribute is true otherwise nothing happen.
booleanIf this attribute set to true, onClose function will be called when user clicks outside the emoji selector.
booleanChange color of highlight color of emoji selector.
string (rgb or hex)Change to true, if you want it darker.
booleanChange background color of emoji selector container.
string (rgb or hex)Change corner radius of the selector.
stringTo disable recently section at the top of selector, set this to false otherwise do nothing.
booleanThis props can be use only when recently props is true.
Use this props to pass your user recently emoji data.
By default, recently data will be collected in user's browser localStorage with the name of react-emoji-selectos (for this option no need to pass anything through this props).
Another option, if you would like to pass your own user data, you can pass array data of emoji through this props to show in recently section.
Array e.g. ['🦁', '🦙', '👺']This function will be called when user click at the clear button when you use your own data in recentlyData.
On the other hand, if you use localStorage (default setting) to collect recently data, you don't have to do anything.
This function will delete data from localStorage by default.
functionUse this attribute as a function to set useState variable to close the emoji selector.
functionUse to get selected emoji from selector. You can pass function through this attribute as an example below.
functionstring (emoji)The emoji selector will close after user select an emoji when this attribute is true otherwise nothing happen.
booleanIf this attribute set to true, onClose function will be called when user clicks outside the emoji selector.
booleanChange color of highlight color of emoji selector.
string (rgb or hex)Change to true, if you want it darker.
booleanTo disable recently section at the top of selector, set this to false otherwise do nothing.
booleanThis props can be use only when recently props is true.
Use this props to pass your user recently emoji data.
By default, recently data will be collected in user's browser localStorage with the name of react-emoji-selectos (for this option no need to pass anything through this props).
Another option, if you would like to pass your own user data, you can pass array data of emoji through this props to show in recently section.
Array e.g. ['🦁', '🦙', '👺']This function will be called when user click at the clear button when you use your own data in recentlyData.
On the other hand, if you use localStorage (default setting) to collect recently data, you don't have to do anything.
This function will delete data from localStorage by default.
functionI'm a newbiew developer so feel free to pull requiests or log issues.
FAQs
Simple, ready to use, and customable react emoji selector component for every react project.
We found that react-emoji-selectors 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.