Animated Text and Microinteractions with Wix Velo
Updated: 8 hours ago
In this example, I created microinteractions with three text elements using the Wix Animations API. When you click on each word, a different animation appears.

What changed in 2026
Wix has moved site coding from Velo to a unified JavaScript SDK. According to the Wix developer docs, you can now use the SDK for most functionality, and Wix offers a migration guide from Velo. Existing Velo code keeps working, so the example below still runs, but new projects are better started with the SDK.
Where to code: the built-in Code panel in Wix Studio or the Wix Editor, the Wix IDE (a VS Code-based online editor for Wix Studio sites) or your own IDE connected through GitHub and the Wix CLI.
Wix Harmony doesn't support site code. Wix says that Harmony, its newest editor, doesn't support site code; you can only add HTML, JavaScript and CSS snippets as custom code. For tutorials like this one, use Wix Studio or the Wix Editor.
AI help: the Wix IDE includes an AI assistant for code, which is handy for adapting this example to your own elements.
How to Create a Similar Animation on Wix?
Page Elements
On our site, I added the following page elements:
Text elements to build the sentence (five of which I’ll use to create microinteractions)
Two images
Code
Inside the $w.onReady() function, we declare all the elements we want to animate. Then we create a separate animation timeline for each of the three elements.
1) Shake effect: when the user hovers over the “microinteractions” text element, we create a shaking effect by quickly moving “microinteractions” in different directions and adding a slight rotation.
2) Arrow slide: when the user hovers over the “text” element, we create an embossed effect by moving the arrow horizontally back and forth, pushing the “with” text element backward and the “text” element forward. For an extra touch, we use the easeInSine and easeOutSine easing parameters from the Wix Animations API.
Please note that we configure this animation differently for mobile devices.
3) Show images: when the user hovers over the “images” text element, we create a fade-in effect that gradually reveals two image elements. We do this by changing the opacity of the image elements and using the easeOutQuad easing parameter from the Wix Animations API.
The final step is to add onMouseIn() and onMouseOut() event handlers to the three text elements. When the user hovers over these text elements, their animations are triggered. When the cursor moves away, the animations will either repeat, pause, or reverse, depending on the specific animation.
Page code
import { timeline } from 'wix-animations';
import { formFactor } from 'wix-window';
// Configure animation for mobile devices
const isMobile = formFactor === 'Mobile';
$w.onReady(function () {
// Declare all elements in the animation:
const micro = $w('#microText');
const images = $w('#imagesText');
const image1 = $w('#firstImage');
const image2 = $w('#secondImage');
const to = $w('#toText');
const text = $w('#textText');
const arrow = $w('#arrowText');
// Shiver 'micro':
const shiver = timeline({ repeat: -1 })
.add(micro, { duration: 50, x: 2, y: 1 })
.add(micro, { duration: 50, x: -2, y: -1 })
.add(micro, { duration: 50, x: 1, y: 2 })
.add(micro, { duration: 50, x: -1, y: -2 })
.add(micro, { duration: 100, rotate: 1 }, 0)
.add(micro, { duration: 100, rotate: -1 }, 100);
// Slide 'arrow':
const slide = timeline({ repeat: -1 })
.add(arrow, { duration: 400, x: isMobile ? -19 : -48, easing: 'easeOutSine' })
.add(to, { duration: 200, x: isMobile ? -8 : -12, easing: 'easeOutSine' }, '-=32')
.add(to, { duration: 200, x: 0, easing: 'easeInSine' })
.add(arrow, { duration: 400, x: 0, easing: 'easeInSine' }, '-=370')
.add(arrow, { duration: 400, x: isMobile ? 19 : 48, easing: 'easeOutSine' })
.add(text, { duration: 200, x: isMobile ? 8 : 12, easing: 'easeOutSine' }, '-=32')
.add(text, { duration: 200, x: 0, easing: 'easeInSine' })
.add(arrow, { duration: 400, x: 0, easing: 'easeInSine' }, '-=370');
// Show images: hide them first so the reverse animation ends at opacity 0
timeline().add([image1, image2], { duration: 0, opacity: 0 }, 0).play();
const show = timeline()
.add(image1, { duration: 0, x: 80, y: -40 })
.add(image2, { duration: 0, x: -80, y: 40 })
.add([image1, image2], { duration: 1000, opacity: 1 })
.add([image1, image2], { duration: 1000, x: 0, y: 0, easing: 'easeOutQuad' }, 0);
// Hover handlers
micro.onMouseIn(() => shiver.play());
micro.onMouseOut(() => shiver.replay().pause());
text.onMouseIn(() => slide.play());
text.onMouseOut(() => slide.pause());
images.onMouseIn(() => show.play());
images.onMouseOut(() => show.reverse());
});Wix animation FAQ
Can I animate text in Wix without code?
Yes. The Wix Editor and Wix Studio have built-in entrance, scroll and hover effects. You only need Velo code for custom scenarios.
Will animations slow down my site?
Light built-in effects barely affect speed. Heavy videos, large images and many simultaneous animations are what slow a site down, especially on phones.
Do animations affect SEO?
Not by themselves, as long as text stays real text rather than an image. But intrusive effects make content harder to read and increase bounce rates.
How do I avoid overdoing animation?
Use it only where it helps people notice or understand something: a button, a key number, a step in a process. One or two effects per screen is enough.
SEO MAMA is an official Wix Legend partner. We build and optimize Wix sites, from editor setup to SEO. Learn more: Wix SEO services.






