04.01 · Micro-Interactions
Hover State Animation
Six ways a card can react when you point at it. Best for buttons and cards.
Hover it
Point at a card (press and hold it on a phone, or Tab to it), or press Show me.
Inside, each card sits beside a copy of its look when pointed at; pointing, pressing or Tab slides it from one look to the other. Point at a card, or press Show me.
Never reacts: the cards ignore the pointer, shown as a ghost; Reacts: each card changes as the pointer reaches it. Point at a card, or press Show me.
Try it
Change a setting, then try it again or press Show me.
Speed
Quick feels responsive; slow can feel sticky.
Feel
Springy goes a little too far, then settles.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add hover feedback to [the buttons, links or cards you want to react]. When the pointer moves over an item, change it in one clear way: shift its background color, grow it slightly, lift it with a deeper shadow, draw an underline out from the left, nudge its arrow forward, or sweep a tint across it. Use one style per kind of item and keep it the same across the page. Apply hover styles only on devices that can hover, and show the same change while an item is pressed on touch screens. If the visitor has reduced motion turned on, switch the look without animating it. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.