UNPKG

@bitworks/svelte-split-text-animation

Version:

Animation of text split into characters, words or lines. Using split-type and GSAP

33 lines (22 loc) 829 B
# svelte split text animation Using GSAP and Split-type packages animates text when top of the viewport is reached ```bash 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 |