eo-typewriterjs
v5.0.0
Published
A typewriter for the web.
Downloads
16
Maintainers
Readme
Navigation
Description
TypewriterJS is a promise-based virtual typewriter that offers an easy and hackable way of producing and maintaining typewriter-like animations on text, basic stuff like typing, deleting and moving the cursor around are only at the command of a method call.
Installation
npm
npm install eo-typewriterjs
bower
bower install eo-typewriterjs
yarn
yarn add eo-typewriterjs
cdn
https://cdn.jsdelivr.net/npm/eo-typewriterjs@latest/dist/typewriter.js
manual
Download the latest version from here. Download a specific version from here.
The following is only applicable starting from version 4.0.0.
- Navigate to the
dist
folder inside of the downloaded package. - Copy either of
typewriter.js
ortypewriter.min.js
to your project.
Building
- Clone the GitHub repository
https://github.com/EOussama/typewriterjs.git
. - Run
npm install
to install all the dependencies. - Run
npm run prod
to build the package. - The production script will be placed in the
dist
folder.
Usage
The following example types the string “Hello, world!”:
index.js
<div id="target"></div>
script.js
var typewriter = new Typewriter("#target");
typewriter.type("Hello, world!");
See more use cases here.
Credits
Icon made by Freepik from www.flaticon.com