1.0.5 • Published 5 years ago
random-title-emoji v1.0.5
Random Title Emoji
A custom hook that add's a random emoji in the title of a React title. NPM link
Installation
npm install random-title-emoji
Example
import { useEmojiTitle } from 'random-title-emoji';
const App = () => {
let custom = ['🍏', '🍎', '🍐'];
return (
<div>
{useEmojiTitle({
category: 'smileys',
timeInterval: 2000,
limit: 10,
customGroup: custom
})}
</div>
);
};
export default App;
Props
category
- The category of emojis you would like to be displayed in the title. ('animalAndNature', 'foodAndDrinks', 'smileys', 'everydayObjects', 'travelAndPlaces'). Default is 'animalAndNature'.timeInterval
- Second parameter of the interval. How fast you want the emojis to change.title
- The title of your document. Default isdocument.title
.placeLast
- Places the emoji in the end of you title. Defualt is false.limit
- Limit how many emojis you want to randomly be shown.customGroup
- An array of icons you specify to loop through.
Author
John Raptis