@vishwas.r/typewriter.js

1.0.1 • Public • Published

TypeWriter.js

A lightweight, easy-to-implement JavaScript plugin to add animated typing effect for websites. Checkout Demo Here

TypeWriter.js on npmjs Featured on Openbase

Why TypeWriter.js

  • Light-Weight (1.6kb)
  • Vanilla JavaScript Library
  • Simple, Easy-to-Use
  • No Dependencies
  • Loop your string(s) continuously

TypeWriter.js Options

# Option Description Options / Examples
1 strings Array of Strings ["Developer.", "Freelancer.", "Content Writer.", "Photographer."]
2 speed Speed of Typing in ms 100, 500, 1000, etc.
3 delay Delay Before Erasing each String (in ms) 1000, 5000, etc.
4 loop Boolean to denote whether to loop the strings or not true, false
5 cursor Custom Cursor "|", "...", etc.

Demo Code

<html>
<body>
<h1 id="typewriter"></h1>
<script src="typewriter.min.js"></script>
<script>
window.onload = function() {
	var typewriter = new TypeWriter("typewriter", {
		strings: ["TypeWriter.js", "Light-Weight", "Simple", "Easy to Use"],
		delay: 2000
	});
	typewriter.start();
}
</script>
</body>
</html>

Package Sidebar

Install

npm i @vishwas.r/typewriter.js

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

44.4 kB

Total Files

7

Last publish

Collaborators

  • vishwas.r