Getting ready to use Typer.js very simple; all of Typer.js is packaged in one
short javascript file.
Place the following script right after your last usage of Typer.js in your HTML.
Add the following after your typer span to create a cursor. Make sure to add
id="first-typer" to the typer as well, or else
cursor won't know who to listen to.
Defines a DOM element as a target for the typing effect.
Options
data-words
A comma-delimited list of words to be typed. Default:'override these,sample typing'
data-delim
Specifies the delimiter used in data-words Default:,
data-delay
The time delay (ms) between typed characters. Default:200
data-loop
The number of repetitons through the word set, or a boolean representing whether to loop infinitely or once. Default:true (loop infinitely)
id (is potential dependency)
A unique identifier that can be used to set the owner property of
other objects. This must be set if a cursor,
typer-start, or typer-stop
is used with this typer.
data-delete-delay
The time delay (ms) before a completed word is de-typed. Default:800
data-colors
A comma-delimited list of colors to cycle through. One color per word. Default:black
class cursor
Converts a DOM element into a blinking cursor.
Options
data-owner (required)
Specifies the id of the typer DOM object associated with this cursor.
data-cursor-display
The cursor representation. Default:_
class typer-start
Turns a DOM element into a button to start a given typer.
Options
data-owner (required)
Specifies the id of the typer DOM object associated with this button.
class typer-stop
Turns a DOM element into a button to stop a given typer.
Options
data-owner (required)
Specifies the id of the typer DOM object associated with this button.