Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
bdrtsky

How to register and use SplitText plugin?

Recommended Posts

First of all I am really frustrated that I had to spend so much time figuring out how to use PAID plugins. Sorry, but I am really frustrated, so I will speak about this.

 

Second, was it so hard to put clear documentation in SplitText chapter how to freaking install it???

 

So I am trying

 

import { gsap } from 'gsap'
import { MorphSVGPlugin } from 'gsap/MorphSVGPlugin'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import { SplitText } from 'gsap/SplitText'
gsap.registerPlugin(MorphSVGPlugin)
gsap.registerPlugin(ScrollTrigger)
gsap.registerPlugin(SplitText)

And what next??? It doesnt exist in window, and it doesnt exist in gsap property. Holy crap, guys. Why this need to be so ugly and confusing.

Link to comment
Share on other sites

Hey bdrtsky. Sorry to hear about the troubles that you're having. 

 

Can you please provide more information about your setup? Are you using a framework like React? If so which one? Any other tools that we should be aware of (like Nuxt or something)? What error(s) is it showing? It's hard to help without knowing anything about what's wrong.

 

Have you already tried using the install helper and watching the video showing how to install GSAP using modules?

 

So long as you properly installed GSAP via the .tgz file, as instructed in the install page and the install video, and your tools work with ES Modules the above code that you have should work. 

Link to comment
Share on other sites

Yes, I am using Nuxt. For now I ended up with injecting `SplitText` along with `gsap` in context. Can't find other way to use it globally. 

Link to comment
Share on other sites

Have you already read through this thread? 

 

 

Link to comment
Share on other sites

Yes I read it, it doesnt answer how to make SPlitText accesible in components.

Link to comment
Share on other sites

You need to import GSAP and all plugins you're going to use in each component in which you want to use them in. That's standard.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×