A lightweight JavaScript module for fading in text one letter at a time
Import the fadeInText
function from the fadeintext.js
module and pass in a DOM element,
duration (in seconds)
synchronousity (in milliseconds per letter)
as arguments. For example:
import { fadeInText } from './fadeintext.js';
const element = document.getElementById('my-element');
fadeInText(element, 1, 50); //htmlElement, duration, synchronousity
Inspired by the FadeIn Sequence from textilate.js You can achieve the same effect as using four libraries, making it more SEO-friendly.
Just plain js