Resource Documentation
Core (Essential for Functionality)
Add the following script before the closing body tag.
Customization (Optional Enhancements)
Use This Solution Multiple Times on a Page
Step 1 - Install GSAP Library
Go to settings -> GSAP -> enable GSAP -> enable ScrambleText
%%spacer-2rem%%

%%resource_divider%%
Step 2 - Add The Following Code
%%resource_divider%%
Step 3 - Define Your Elements
3.1 - Define Your Trigger
%%spacer-2rem%%
Add the following attribute to the element you want to use as the hover trigger.
%%resource_divider-small%%
%%spacer-2rem%%

%%spacer-3rem%%
3.2 - Define Your Target
%%spacer-2rem%%
Add the following attribute to the child text element you want to animate when the trigger is activated.
%%resource_divider-small%%
%%spacer-2rem%%

%%resource_divider%%
Step 4 - Customization
%%spacer-3rem%%
4.1 - Direction
%%spacer-2rem%%
%%spacer-2rem%%
Sets the animation direction. Use 'ltr' for a left-to-right animation, or 'combine' if you want the animation to go left-to-right on hover in and right-to-left on hover out.
%%spacer-3rem%%
4.2 - Duration
%%spacer-2rem%%
%%spacer-2rem%%
Defines how long the scramble animation lasts (in seconds). Lower values make it faster.
%%spacer-3rem%%
4.3 - Ease
%%spacer-2rem%%
%%spacer-2rem%%
Controls the easing style of the animation. You can use any GSAP-compatible easing string.
%%spacer-3rem%%
4.4 - Speed
%%spacer-2rem%%
%%spacer-2rem%%
Adjusts how quickly characters cycle during the scramble. Higher values = more rapid changes.
%%spacer-3rem%%
4.5 - Chars
%%spacer-2rem%%
%%spacer-2rem%%
Sets the pool of characters used during scrambling. Customize it to include symbols, numbers, etc.
%%spacer-3rem%%
4.6 - Old Class
%%spacer-2rem%%
%%spacer-2rem%%
Adds a different style to animated characters, useful for the in-between state. Use the code below to apply custom styling or leave it blank if you dont need any custom styles in between.
%%spacer-2rem%%
%%spacer-2rem%%
Then add the scrambling class here
%%spacer-2rem%%
%%spacer-3rem%%
4.7 - New Text After Scramble
%%spacer-2rem%%
%%spacer-2rem%%
Replaces the final unscrambled text with new content. Leave empty to use the existing text. Make sure the new text isn’t longer than the original to avoid overflow.
%%spacer-2rem%%
%%resource_divider%%
To learn more about GSAP ScrambleText click here✌