@bitworks/svelte-split-text-animation
v1.0.9
Published
Animation of text split into characters, words or lines. Using split-type and GSAP
Downloads
9
Maintainers
Readme
svelte split text animation
Using GSAP and Split-type packages animates text when top of the viewport is reached
npm install @bitworks/svelte-split-text-animation
Usage
<script>
import {SplitText} from "@bitworks/svelte-split-text-animation";
</script>
<SplitText animationY={'50%'} animationDuration={1} animationStagger={0.3} animationType={'words'} >
<p>Lorem ipsum dolor sit amet</p>
</SplitText>
Available Parameters
Parameters correspond to gsap and split-type values
| Params | Value | | ----------- | ----------- | | animationY | '100%' | | animationDuration | 1 | | animationType | 'lines', 'words', 'chars' | | animationStagger | 0.3 |