TypePlay.js
TypePlay is a JavaScript library that help the user create a visual effect - to type text like a real person would.
TypePlay
Install Install using NPM, GIT or just hotlink the script.
From NPM:
npm install typeplay --save
From GIT:
git clone ...npm updatenpm run build
From a Hotlink
CSS
The blinking cursor is a "|" character position and animated using css. Depending on your choice of font-family
and font-size
you might need to modify the left
and margin-right
properties. Adjust until blinking cursor stops dislocating the characters around it.
@ 49% 50% 99% 100% }
Initialization
TypePlay comes in CJS and IIFE formats pre-build:
IIFE
If you would like to just add it in your browser and use it straight away use any of the IIFE version:
CJS
If you would like to package it together with other scripts in your App using Webpack or any other alternatife use the CJS version:
;
; let element = document;let typer = element typeSpeed: min: 90 max: 240;typer type"PHP develo" type"JavaScript Dev" type"Software Developer" ;
Digging a little deeper
If you dig a little deeper into the source you will notice that there are 2 classes - TypePlay
and TypeWrap
. The second is there only to provide the chainability. Building the TypePlay
source (the index.js file) will result in building TypeWrap
.