npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@murtuzaalisurti/wavy

v1.3.1

Published

A package to generate animated wavy text!

Downloads

51

Readme

Wavy Text Animation Library

A JavaScript Library which allows you to animate infinite words in an infinite loop in a modern wavy way!

download badge github release Featured on Openbase

image

Options


NPM package - Usage

- Install the package

npm i @murtuzaalisurti/wavy

- Import the package

const { wavy } = require('@murtuzaalisurti/wavy');

OR

import { wavy } from '@murtuzaalisurti/wavy';

- Invoke the function

  • Invoke the below function with the required arguments as shown below in your javascript file! Let's understand these arguments which are passed to the function!

wavy(
    html_element, // example : document.querySelector('.text')
    {
        words: ["word-1", "word-2", "word-n"]
    }, 
    {
        color: 'font-color', // hsl, rgb, hex, rgba, css standard values
        fontSize: 'font-size', // any valid unit
        fontFamily: 'font-family', // any valid font family 
        transform: 'scale(x)' // example : scale(1.5)
    }
);
  • The first argument you should pass is an html element in which you want to place the words! It's like a wrapper element!

  • Example for first argument:


wavy(document.querySelector(".text"), second_argument, third_argument);
  • The second argument you should pass is an object with a property of words set to a value of an array containing as many words as you want to display. There is no word limit. These words will be animated in an infinite loop!

  • Example for second argument:


wavy(document.querySelector(".text"), {words: ["Wavy", "Text", "Animation", "Library", "JavaScript"]}, third_argument);
  • The third argument you should pass is an object with some options to set the color, fontSize, fontFamily and scale properties of the text. Here are all the properties that you can modify:
//these are default values

{
    color: 'black', // you can also use rgb, hsl, rgba, hex
    fontSize: '1rem',
    fontFamily: 'sans-serif',
    transform: scale(1.5)
}
  • Example for third argument:

wavy(
    document.querySelector(".text"), 
    {
        words: ["Wavy", "Text", "Animation", "Library", "JavaScript"]
    },
    {
        color: 'green', 
        fontSize: '2rem', 
        fontFamily: 'Poppins, sans-serif', 
        transform: 'scale(1.8)'
    }
);

*NOTE: The first two arguments are mandatory!


For Browsers - Usage

For npm package, please follow the instructions mentioned here.

- Fetch the library from CDN

In order to use it, insert the following <script> tag in the <head> tag of your HTML document.


<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@murtuzaalisurti/wavy/production.min.js"></script>

NOTE :- In order to fetch the latest version of the library, perform a hard reload (CTRL + SHIFT + R) in your browser to bypass the file stored in disk cache. If you don't do this, your browser will load an older version of the library from disk cache!

OR


<!-- UNPKG -->
<script src="https://unpkg.com/@murtuzaalisurti/wavy@latest/production.min.js"></script>

- Invoke function

  • Invoke the below function with the required arguments as shown below in your javascript file! Let's understand these arguments which are passed to the function!

wavy(
    html_element, // example : document.querySelector('.text')
    {
        words: ["word-1", "word-2", "word-n"]
    }, 
    {
        color: 'font-color', // hsl, rgb, hex, rgba, css standard values
        fontSize: 'font-size', // any valid unit
        fontFamily: 'font-family', // any valid font family 
        transform: 'scale(x)' // example : scale(1.5)
    }
);
  • The first argument you should pass is an html element in which you want to place the words! It's like a wrapper element!

  • Example for first argument:


wavy(document.querySelector(".text"), second_argument, third_argument);
  • The second argument you should pass is an object with a property of words set to a value of an array containing as many words as you want to display. There is no word limit. These words will be animated in an infinite loop!

  • Example for second argument:


wavy(document.querySelector(".text"), {words: ["Wavy", "Text", "Animation", "Library", "JavaScript"]}, third_argument);
  • The third argument you should pass is an object with some options to set the color, fontSize, fontFamily and scale properties of the text. Here are all the properties that you can modify:
//these are default values

{
    color: 'black', // you can also use rgb, hsl, rgba, hex
    fontSize: '1rem',
    fontFamily: 'sans-serif',
    transform: scale(1.5)
}
  • Example for third argument:

wavy(
    document.querySelector(".text"), 
    {
        words: ["Wavy", "Text", "Animation", "Library", "JavaScript"]
    },
    {
        color: 'green', 
        fontSize: '2rem', 
        fontFamily: 'Poppins, sans-serif', 
        transform: 'scale(1.8)'
    }
);

NOTE: The first two arguments are mandatory!


Demo

Try it on CodePen!