Create modern and catchy text animation with this script. AutoWritingText simulates the writing of texts. Each letters appear each after another. A cursor is included to give authenticity. This lightweight javascript code can help you to bring your website to the next level ! Trigger the writing of a text with click, touch or scroll events or at anytime with a line of javascript.
It would be virtually impossible to create complex text animations only with css transitions. With AutoWritingText you can do it with one line of javascript or html tags.
You can change font-size, font-color, font-family as you wish. AutoWritingText can be used on almost any html tag (div, p, h1-6, span, …).
AutoWritingText works in all the latest browsers, and partially in old ones (some features, in IE8, may be disabled).
AutoWritingText doesn’t alter your other css files so your layout will stay responsive as before.
You can choose to use AutoWritingText both with javascript (with one line of code) and html (simply adding special attributes to html tags).
You don’t have to alter your html structure. AutoWritingText can animate almost every tags containing text.
AutoWritingText doesn’t require any dependencies to function.
<link rel="stylesheet" href="styles.css?v=1.0">
in the <head>
of your html<script src="scripts.js">
just before the end of your body in your htmldata-autowritting='True'
data-speed
, give it the value very-fast, fast, normal, slow or very-slow, it’s the speed of writing.data-begin
, give it the value click-touch
, on-load
, scroll
or js
, it’s the event to trigger the animationdata-delay
, give it a number greater than 0, it’s the number of seconds to wait after the trigger event to start the animationdata-random='True'
if you want to add some random in the delay between the writing of two letters.autowritting(document.getElementById('your-id'));