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

create-advanced-typewriter-animation

v0.1.5

Published

Downloads

10

Readme

Super Powerful Typewriter / Streaming Animation

This JavaScript library offers user-friendly web text animations, including typewriter effects, streaming effects and other styles, with a focus on performance.

Demo

Preview

capture

Install

This project relies on Node.js and npm. Ensure you have them installed locally if not already.

$ npm i create-advanced-typewriter-animation

Once the package is installed, you can import the library using either the import or require approach.

// using ES6 modules
import  createAdvancedTypingAnimation from 'create-advanced-typewriter-animation';

The UMD build is also accessible

<script src="/node_modules/create-advanced-typewriter-animation/dist/umd/bundle.js"></script>

then you can use window.createAdvancedTypingAnimation

Usage Example:

createAdvancedTypingAnimation(document.querySelector('.container'), `
    <writing infinity="true">
        <cursor />
        <typewriter duration='10' mode="1">
        a super powerful typing animation plugin, meticulously crafted using native JavaScript. It creates a captivating typewriter effect, infusing your web projects with a refined touch of sophistication.
        </typewriter>
    </writing>
`)

Directive Explanation:

| Directive | Description | Attributes | | ------------ | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | <writing> | Specifies the writing block, containing various child elements (e.g., <cursor>, <hideCursor>, <typewriter>, <moveCursor>, <delete>, <mask>, <clear>). | infinity: Specifies whether the animation should loop infinitely (true or false). | | <cursor> | Represents the typing cursor. Used inside the <writing> block to denote where typing should begin. | None | | <hideCursor> | Hides the typing cursor. Used inside the <writing> block to hide the cursor. | None | | <typewriter> | Represents a block of text that is typed out in the animation. | - speed: Typing speed in units per character (higher number means slower typing). - duration: Specifies the total duration of the typing effect (overrides speed if provided). - mode: Typing animation style (0, 1, or 2): - 0: Character by character typing. - 1: Word by word typing. - 2: Sentence by sentence typing. - className: CSS class for the typed text, useful for styling specific parts of the text. | | <moveCursor> | Moves the cursor a specified number of steps. | - duration: Duration of the cursor movement. - mode: Cursor movement style (0 or 1): - 0: Moves the cursor backward. - 1: Moves the cursor forward. - count: Number of steps to move the cursor. | | <delete> | Represents a deletion effect where characters are removed one by one. | - duration: Duration of the deletion effect. - count: Number of characters to delete. Note: The <delete> directive only works when the cursor is specified in the previous directive. | | <delay> | Represents a delay or pause in the animation. | duration: Duration of the delay. | | <mask> | Represents a mask effect that reveals or hides text in a certain style. | - duration: Duration of the mask effect. - color: Color or gradient for the mask. - mode: Mask style (0, 1, or 2): - 0: Character by character masking. - 1: Word by word masking. - 2: Sentence by sentence masking. | | <clear> | Clears the contents of the writing block. | None |