Letter-by-letter and word-by-word text fade animation.
- Node.js (npm)
https://cdn.jsdelivr.net/npm/faded-text@0.0.13/dist/faded-text.min.js
npm i faded-text
yarn add faded-text
Function | Description | Arguments | ||
---|---|---|---|---|
.charFadeIn() | Display the matched elements by fading them to opaque letter-by-character. |
textDuration (default: 1000) Type: Integer An integer determining the number of milliseconds the total animation will run. |
charDuration (default: 1000) Type: Integer An integer determining the number of milliseconds the character animation will run. |
delay (default: 0) Type: Integer An integer indicating the number of milliseconds to delay execution of the animation. |
.charFadeOut() | Hide the matched elements by fading them to transparent letter-by-letter. | |||
.wordFadeIn() | Display the matched elements by fading them to opaque word-by-word. |
wordDuration (default: 1000) Type: Integer An integer determining the number of milliseconds the word animation will run. |
||
.wordFadeOut() | Hide the matched elements by fading them to transparent word-by-word. |
<div id="idElement">Hello world</div>
import FadedText from 'faded-text';
const FADED_TEXT = new FadedText('idElement');
FADED_TEXT.charFadeIn();