random-title-emoji

1.0.5 • Public • Published

Random Title Emoji

A custom hook that add's a random emoji in the title of a React title. NPM link

gif emoji example

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 is document.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

Readme

Keywords

Package Sidebar

Install

npm i random-title-emoji

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

88.4 kB

Total Files

10

Last publish

Collaborators

  • johnraptis