eo-typewriterjs
v5.0.0
Published
A typewriter for the web.
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-typewriterjsbower
bower install eo-typewriterjsyarn
yarn add eo-typewriterjscdn
https://cdn.jsdelivr.net/npm/eo-typewriterjs@latest/dist/typewriter.jsmanual
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
distfolder inside of the downloaded package. - Copy either of
typewriter.jsortypewriter.min.jsto your project.
Building
- Clone the GitHub repository
https://github.com/EOussama/typewriterjs.git. - Run
npm installto install all the dependencies. - Run
npm run prodto build the package. - The production script will be placed in the
distfolder.
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
