Home > Web Front-end > JS Tutorial > body text

Emojify

PHPz
Release: 2024-08-10 09:09:33
Original
501 people have browsed it

Emojify

Emojify

Emojify is a customizable emoji trail javascript library that follows your mouse cursor, embedding playfulness and personality into any webpage.

Star the project on Github

Installation

CDN

Import Emojify using CDN.

import Emojify from 'https://cdn.jsdelivr.net/npm/open-emojify/emojify.min.js';
Copy after login

? Specific Version

import Emojify from 'https://cdn.jsdelivr.net/npm/open-emojify/emojify.min.js@latest';
Copy after login

Usage

Call the Emojify library in your Javascript. That's it ?.

new Emojify({});
Copy after login

Customization

Emojify comes with options / variables that can easily be customized.

new Emojify({
    emojis: ['?','?','?','?'], // replaces default emojis with emojis within a string
    random: true, // determines if emojis should be shown random or in order
    duration: 500, // duration before hiding emojis
    delay: 5, // delay between showing a new emoji
    size: '48px', // font-size of emojis
    zIndex: 9999, // z-index of emojis
});
Copy after login

Check out the Demo on Codepen.

The above is the detailed content of Emojify. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template