Skip to Content
๐ŸŽฒ Welcome to RandBox - Powerful JavaScript Random Data Generation Library! Learn More

emoji

// usage randBox.emoji(); randBox.emoji({ category: "smileys_and_emotions" }); randBox.emoji({ length: 5 });

Return a random emoji.

randBox.emoji(); => '๐Ÿ˜€'

Default is a single random emoji from a randomly selected category.

Can optionally specify a length to increase the number of emojis from a single randomly selected category.

randBox.emoji({ length: 5 }); => '๐Ÿˆ๐Ÿ๐Ÿซ๐Ÿซ’๐ŸŒฝ'

Can optionally specify a category of emoji.

randBox.emoji({ category: "symbols" }); => '๐Ÿšพ'

Available emoji categories are:

"smileys_and_emotion", "people_and_body", "animals_and_nature", "food_and_drink", "travel_and_places", "activities", "objects", "symbols", "flags"

The default category, "all", will result in a category from the options above being chosen at random.

Last updated on: