Textion is a javascript module for text animation.
It adds text animation without any affecting your code.
npm install textion
yarn add textion
Download js file in dist folder or using npm.
And include it.
<script src="path/textion.js"></script>
To use Textion, add the class 'textion' to the text elements.
<p class="textion"></p>
Then add the options you want to use in the text elements' class list.
Class Name | Default | Description |
---|---|---|
timeout-{number} |
0 | The latency before animation starts. (ms) |
interval-{number} |
65 | The interval of animation loop. (ms) |
repeat-{number} |
2 | The number of character changes. |
lerpSpeed-{number} |
4 / {timeout.number} |
The speed of opacity changing in lerp function |