The world's lightest yet most powerful JS TypeWriter
by Edern Clemente.
The original typing experience. Without the noise.
worth of marvellous features.
lighter than its competitors.
//Place the .js file in your folder and import it after the body tag
<script src ="path/typelighter.min.js"></script>
//You can also use the CDN version :
<script src ="https://cdn.jsdelivr.net/npm/typelighterjs/typelighter.min.js"></script>
//Add a new typewriter
<span class="typeWriter" data-text='["foo"]'></span>
In order to install TypeLighter.js, you just have to import it using a script tag. Once done, use the typeWriter class to create new dynamically animated elements. The CSS is automatically injected in the DOM for convenience, though you could also paste it in your CSS file.
With this plugin, eight properties allow you to fine-tune the experience you want to share with your users. Most of them are predefined, but you can change their values using the data attribute.
//Set properties with the data tag to tailor your effect
<p>Deeply <span class="typeWriter" data-max="1.5" data-text='["satisfying.","customizable."]'</span></p>
//Disable random writing
<p>Deeply <span class="typeWriter" data-random="false" data-text='["satisfying."]'></span></p>
|data-text||Null||The array holding the strings to be written one after the other.|
|data-speed||1||The writing speed is proportionnal to this integer.|
|data-start||500 (ms)||A delay before writing the next string.|
|data-end||2000 (ms)||A delay before deleting the current string.|
|data-random||True||When enabled, the TypeWriter waits for a random time before writing or deleting the next character.|
|data-max||Infinity||The maximum number of full iterations before the TypeWriter stops itself.|
|data-dltSpeed||True||When enabled, a given string is deleted twice as fast as it is written.|
|data-checkVisible||False||When enabled, the animation begins right when the element appears in the viewport.|
Take a stride into the world of dynamic and appealing web design. You can be sure that you will never even think of looking back.Free download