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

native-typed

v1.0.0

Published

README.md

Downloads

3

Readme

Native Typed

Build Status NPM Version

A tiny dependency free JavaScript library javascript library for typing animation.

  • 1.77 kB gzipped of minified version :zap:
  • Dependency-free :tada:
  • IE9+ :heavy_check_mark:
new NTyped(document.querySelector('#caption'), {
  strings: ['vue', 'react', 'angular'],
  typeSpeed: 30,
  deleteSpeed: 15,
  loop: true
});

Getting Started

Step 1: Install

Download the latest release or install with npm.

npm install native-typed --save

Step 2: Reference

If you linked native-typed directly in your HTML, you can use window.NTyped. If you're using a module bundler, you'll need to import it.

// CommonJS
let NTyped = require('native-typed');

// ES2015
import NTyped from 'native-typed';

Options

You can set options on native-typed during initialization.

// During initialize
new NTyped(document.querySelector('#caption'), {
  strings: ['vue', 'react', 'angular'],
  typeSpeed: 30,
  deleteSpeed: 15,
  loop: true
});

###options.strings The array of strings to display in typing animation.

Default: (array) ['This is a typing animation!', 'You can also add your own sentences', 'So go do it!']

###options.stringType Determines whether provides strings are using HTML or not. You can choose between NTyped.Types.HTML and NTyped.Types.TEXT.

Default: (enum) NTyped.Types.HTML

###options.loop Make animation loop.

Default: (boolean) true

###options.showCursor Show cursor.

Default: (boolean) true

###options.cursorChar If cursor is enabled through options, show this character.

Default: (string) |

###options.startDelay Time delay in milliseconds before typing writing animation starts initially.

Default: (int) 500

###options.backDelay Time delay in milliseconds before deleting characters after typing them out.

Default: (int) 500

###options.typeSpeed The speed of typing characters in milliseconds.

Default: (int) 0

###options.deleteSpeed The speed of deleting characters in milliseconds.

Default: (int) 0

###options.classes.cursor Classname for cursor element.

Default: (sring) title__cursor

To have the cursor effect, please add following CSS to your stylesheet.

.title__cursor {
   opacity: 1;
   animation: blink 750ms infinite;
}

@keyframes blink {
   0%   { opacity: 1; }
   50%  { opacity: 0; }
   100% { opacity: 1; }
}

Contributions & Issues

Contributions are welcome. Please clearly explain the purpose of the PR and follow the current style.

Issues can be resolved quickest if they are descriptive and include both a reduced test case and a set of steps to reproduce.

Licence

Licensed under the MIT License © 2016 Genert Org

Extra

Inspired by Typed.js