Example Description
In this example we built a sentence containing 3 text elements that have different microinteractions. When a site visitor hovers over one of these 3 text elements, they will see an animation.
How We Built It
Page Elements
In our site we added the following page elements:
8 text elements to build the sentence (5 of which we will use to create our microinteractions).
2 images.
Code
In the $w.onReady() function we declare all the elements we want to animate. We then create the individual animation timelines for each of the 3 animations:
Shiver ‘microinteractions’: When the user hovers over the text element “microinteractions”, we create a shiver effect by quickly moving “microinteractions” in all directions and adding a slight rotation.
Slide ‘arrow’: When the user hovers over the text element “text”, we create a bump effect by sliding the arrow horizontally back and forth pushing the text element, “to” backwards, and the text element “text” forward. For extra effect, we use the easeInSine and easeOutSine easing parameters of the wix-animations API. Note that we configure this animation differently for mobile devices.
Show images: When the user hovers over the text element “images”, we create a fade effect by gradually showing 2 image elements. We do this by changing the opacity of the image elements and by using the easeOutQuad easing parameter of the wix-animations API.
The last step is to add onMouseIn() and onMouseOut() event handlers to the 3 text elements. When hovering over the 3 text elements, their animations will play. When hovering off the 3 text elements, their animations will either replay, pause, or reverse depending on the animation.
Related Examples
Did this help?
|
Thanks for your feedback!

Custom Button Animation
Create a custom button that rotates clockwise and changes color on click using the Wix Animations API.

Beginner

Hourglass Animation
Flip an hourglass automatically or on a button click using the Wix Animations API.

Advanced

Ball Drop Animation
Create a ball drop animation where balls fall through a maze and dot the letter I’s in your words.

Advanced

Solar System Animation
Create a simplified solar system animation using the Wix Animations API.

Advanced

Vector Image Animation
Create an animation of a ball moving and then taking the place of the letter O’s in your words.

Beginner