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

angular-typewriter

v0.0.15

Published

AngularJS directive that simulates the effect of typing on a text editor

Downloads

46

Readme

Angular Typewrite

Description

AngularJS directive that simulates the effect of typing on a text editor - with a blinking cursor.

This directive works as an attribute to any HTML element, and it changes the speed/delay of its animation.

##Installation Just clone this repository, do bower install angular-typewrite --save or npm install angular-typewriter --save. After including the angular-typewrite.js file on your app, inject it 'angularTypewrite' as a dependency on your AngularJS module:

angular
	.module('yourAppName', [
	'rest',
	'of',
	'your'
	'dependencies',
	'angularTypewrite']);

If you installed it by NPM, do:

var tw  = require('angular-typewriter');
angular
	.module('yourAppName', [
	'rest',
	'of',
	'your'
	'dependencies',
	tw]);

NOTE: For the blinking effect, add the angular-typewrite.css file to your loaded stylesheets.

##How to use

Just add the typewrite attribute to the desired HTML element, passing the text that should print as the 'text' attribute and the directive takes care of the rest.

The 'text' attribute can be a single string or an array of string. In case an array is passed, the string on each index is erased so the next item can be printed. When the last index is reached, that string stays on the screen. (So if you want to erase the last string, just push an empty string to the end of the array).

##Preferences

These are the optional preferences:

  • initial delay: set an 'initial-delay' attribute for the element
  • type delay: set a 'type-delay' attribute for the element
  • erase delay: set a 'erase-delay' attribute for the element
  • specify cursor : set a 'cursor' attribute for the element, specifying which cursor to use
  • turn off cursor blinking: set the 'blink-cursor' attribute to "false"
  • cursor blinking speed: set a 'blink-delay' attribute for the element
  • control the typing start with scope variable: set a 'start' attribute for the element
  • scope callback: pass the desired scope callback as the 'callback-fn' attribute of the element

Note: Each time/delay value should be set either on seconds (1s) or milisseconds (1000)

##Dependencies This directives only depends the core AngularJS file and on the CSS file provided (angular-typewrite.css) in order to replicate the cursor blinking effect.

Demo

I created a Simple Demo to show the directive working.