1.0.15 • Published 6 years ago

typograph v1.0.15

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Typograph

Overview

Typographis a pure JavaScript module which allows you to simulate a typewriter effect on any text or group of text you want. It offers a bunch of options from classic one as typing/backspacing speed, humanized speed etc. to some you won't find easily elsewhere like simulating misstyping or retyping. You can of course use it in its simplest form by only setting you own selectors in target.

Browser support

ChromeSafariIE / EdgeFirefoxOpera
24+6+10+32+15+

Installation

$ npm install typograph
$ yarn add typograph
import Typograph from 'typograph'

Or manually download and link lib/typograph.min.js in your HTML:

<script src="typograph.min.js"></script>

Usage

new Typograph({
  target: '.typeMe',                  // Mandatory
  text: 'Type me if you can',         // Optional
  speed: 150,                         // Optional
  fixePosition: true,                 // Optional
  cursor: '|',                        // Optional
  mistyping: true,                    // Optional
  mistypingRate: 2,                   // Optional
  callback: function() {              // Optional
    this.erase({
      callback: () => {
        this.retype({
          text: 'Well done !',        // Mandatory
          eraseBefore: true,          // Optional
          eraseSpeed: 50              // Optional
        });
      }
    });
  }
});
1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago