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

type-wave-flow

v2.0.7

Published

type-wave-flow is a package where users input the text or numbers & print it in different effects on screen

Downloads

22

Readme

TypeWaveFlow

TypeWaveFlow is a lightweight package that provides a simple yet visually appealing effect for displaying text in a wave-like motion. With just a few lines of code, you can add a TypeWaveFlow effect to your web application, giving your users an engaging and dynamic experience.

Features

  • TypeWaveFlow effect for displaying text in a wave-like motion
  • Dynamic word, character set, console element, and delay settings
  • Works in JavaScript, React, and Angular

Rotation Print

TypeWaveFlow in action

Smooth Print

TypeWaveFlow in action

After Effect

TypeWaveFlow in action

Scroll Print

TypeWaveFlow in action *Do use CSS overflow-y: scroll in the element in which you're printing to give scrolling effect

Usage

Function Parameters

  • word (string, required): The word to be displayed in the TypeWaveFlow effect.
  • consoleElemId (DOM element, required): The DOM element where the effect should be displayed.
  • characters (array, contains default value): An array of characters to be displayed in the effect. By Default it contains 36 characters consisting 26 alphabets & 0 - 9 integers.
  • delay (number, contains default value): The delay (in milliseconds) between each frame of the effect. By Default it is 20 (in milliseconds)
  • completeLimit (number, contains default value): Only required when using scroll print effect to define how many times the complted word should print. By Default it is 10.

// order of function parameters
TypeWaveFlow.rotationPrint(word, consoleElemId, characters, delay)

// parameter completeLimit should only be required in Scroll Print Effect
TypeWaveFlow.rotationPrint(word, consoleElemId, characters, delay, completeLimit)

// available functions

TypeWaveFlow.rotationPrint(word, consoleElemId, characters, delay)

TypeWaveFlow.smoothPrint(word, consoleElemId, characters, delay)

TypeWaveFlow.afterEffect(word, consoleElemId, characters, delay)

TypeWaveFlow.scrollPrint(word, consoleElemId, characters, delay, completeLimit) // parameter completeLimit should only be required in Scroll Print Effect

Via CDN


<script src="https://cdn.jsdelivr.net/npm/type-wave-flow"></script>
 const word = 'hello world'
 const consoleElemId = 'console'
 const characters = ['q', 'w', 'e', 'r', 't', 'y']
 const delay = 50

 // Using default values for characters & delay (in milliseconds)
 window.onload = () =>  TypeWaveFlow.rotationPrint(word, consoleElemId); 
 
 
 // Using custom parameters for characters & delay (in milliseconds)
 window.onload = () =>  TypeWaveFlow.rotationPrint(word, consoleElemId, characters, delay); 

Via NPM

To install the package, run npm install type-wave-flow

In React

import React, { useEffect, useRef } from 'react';
import { TypeWaveFlow } from 'type-wave-flow';

function MyComponent() {
  const consoleRef = useRef(null);
  const consoleRefTwo = useRef(null);

  useEffect(() => {
    // using default values for characters & delay
    const word = 'hello world'
    
    TypeWaveFlow.rotationPrint(word, consoleRef);
  }, []);

  return <div ref={consoleRef}></div>;
  
  
  
  useEffect(() => {
    // using custom parameters
    const word = 'hello world'
    const characters = ['q', 'w', 'e', 'r', 't', 'y']
    const delay = 50
    
    TypeWaveFlow.smoothPrint(word, consoleRefTwo, characters, delay);
  }, []);

  return <div ref={consoleRefTwo}></div>;
  
}

In Angular

import { Component, ElementRef, AfterViewInit, ViewChild } from '@angular/core';
import { TypeWaveFlow } from 'type-wave-flow';

@Component({
  selector: 'app-my-component',
  template: '<div #console></div>   <div style="overflow-y: scroll" #printScroll></div>'
})
export class MyComponent implements AfterViewInit {
  @ViewChild('console', { static: false }) consoleRef: ElementRef;
  @ViewChild('printScroll', { static: false }) printScrollRef: ElementRef;

  ngAfterViewInit(): void {
    // using default values for characters & delay
    const word = 'hello world'
    
    TypeWaveFlow.rotationPrint(word, this.consoleRef.nativeElement);
  }
  
  
  
  ngAfterViewInit(): void {
    // using custom parameters
    // argument completeLimit is number of times the completed word should print while scrolling
    const word = 'hello world'
    const characters = ['q', 'w', 'e', 'r', 't', 'y']
    const delay = 50
    const completeLimit = 20
    
    TypeWaveFlow.scrollPrint(word, this.printScrollRef.nativeElement, characters, delay, completeLimit);
}

Upcoming Features

  • [ ] Option to display the effect in different colors or gradients
  • [ ] Option to display effect in different patterns
  • [ ] Ability to pause and resume the effect
  • [ ] Option to change the direction of the wave animation (e.g. left-to-right, right-to-left)

We are constantly working to improve and expand the capabilities of TypeWaveFlow, so stay tuned for updates and new features!

We are always looking for ways to improve and enhance our software, so please feel free to share any feedback or ideas you may have!

Contribution

If you'd like to contribute to TypeWaveFlow, please fork the repository and submit a pull request.

License

MIT