react-random-emoji
v1.0.2
Published
A React component that displays random emojis based on mood
Downloads
16
Readme
Random Emoji React
A simple and fun React component that generates random emojis based on mood. Spice up your React applications with expressive emojis that change dynamically!
Features
- Generate random emojis
- Mood-based emoji selection
- Customizable emoji size
- Lightweight and easy to use
Installation
Install the package using npm:
npm install random-emoji-react
Or using yarn:
yarn add random-emoji-react
Usage
Here's a quick example of how to use the RandomEmoji
component:
import React from 'react';
import { RandomEmoji } from 'random-emoji-react';
function App() {
return (
<div>
<h1>Random Emoji</h1>
<RandomEmoji mood="happy" size={48} />
<RandomEmoji mood="sad" size={32} />
</div>
);
}
export default App;
API
<RandomEmoji>
The main component for generating random emojis.
Props:
mood
(string, optional): The mood for the emoji. Available options are:- 'happy' (default)
- 'sad'
- 'angry'
- 'surprised'
- 'love'
- 'neutral'
- 'sleepy'
- 'sick'
- 'cool'
- 'silly'
size
(number, optional): The font size of the emoji in pixels. Default is 24.
Enjoy adding some emoji flair to your React projects! 🎉