Move on hover
Make something move when someone points at it. Add a While Hovering behavior, try each effect (Fade, Slide, Blur, Scale and Rotate), then pick the easing and duration, on the Inkwell & Oak template.
Steps
- Open the Inkwell & Oak template if you’d like to follow along.
- Effects don’t play while you edit. Preview, at the top right, shows them.
- Select something, click the lightning bolt beside it, open Behavior and add one with the plus.
- Pick the While Hovering trigger, so it runs while the pointer is over it and goes back when it leaves.
- Choose Apply an effect to move it. Do an action swaps it for another version of itself.
- Fade, Slide, Blur, Scale and Rotate. The panel’s own Preview plays each one on a sample square.
- Easing sets how the move starts and stops, and Duration how long it takes.
- Phones and tablets have no pointer, so keep anything important out of hover.
- Open Preview and move the pointer over each tile to see the effects play.
Read the full transcript
You know when you move your mouse over something on a website and it reacts, maybe it tilts a little or lifts up? It's a small detail, but it makes a page feel alive. In this video I'll show you how to make something move when someone points at it. We're on Inkwell & Oak, a template for a design studio that does branding and packaging.
One thing first. Effects like these don't play while you're editing, so the page stays still while you work on it. To see them, you use Preview, up here. We'll come back to it at the end.
I'll click this luggage tag. The lightning bolt beside it opens its behaviors. Styles is for how something looks at different moments, and Behavior is for what it does, like animating in, reacting to the mouse, or doing something when it's clicked. I'll open Behavior. This panel shows what the tile already does: it fades in as it comes into view. I'll add a new one with the plus.
Every behavior starts with a trigger, which is the thing that sets it off. There's On Click, In View, and a few more. I want While Hovering. Hovering means resting the pointer over something without clicking. So this runs while the pointer is over the tile, and as soon as it moves away, the tile goes back to how it was.
Next, there's a choice. Do an action swaps the tile for a different version of itself, say in another color, and that's the next video. Apply an effect moves it, which is what I want here.
There are five effects, so let's try each one. Fade makes it fade away while the pointer is on it. This little Preview plays the effect on a sample square, so you can try things without leaving the panel. Slide moves it. Direction is which way it goes, and Distance is how far. Blur softens it, and Amount is how soft. Scale changes its size. From is its normal size, and To is its size while you're hovering, so one point oh eight is a little bigger. And Rotate turns it. For a luggage tag, I like Rotate. Fifteen degrees is a lot, so I'll bring it down to six, just enough to look like someone nudged it.
Easing is how the move starts and stops. Smooth eases in and out evenly. Ease out starts fast and lands softly. Ease in is the opposite. Snappy finishes quickly, Spring goes a touch too far and settles back, and Linear keeps one steady pace. Spring feels right for a tag on a string. Duration is how long it takes, in milliseconds. You can type a number, or pick small, medium or large. I'll take medium.
I'll give the pencil one too, with Scale, so it grows a little. While I do, something to keep in mind. Phones and tablets don't have a pointer, so nobody can hover there. Hover is great for small extras, but don't hide anything important behind it.
Now let's see it the way a visitor would. I'll click Preview. Here's the page, with everything working. I'll move the pointer onto the tag, and it tilts with a little spring. When I move away, it settles back. Now the pencil, and it grows a touch. The project cards react to hover too, but they change how they look rather than move. That's what we'll cover in the next video.
So that's a hover effect: While Hovering, then Apply an effect, then the panel's Preview to fine-tune it before you check it on the page.