221

Add to Cart Fly

Add to cart sends the product thumbnail flying in an arc into the cart

Card & groupHover & clickUI interactionApp UIEmphasisGSAPGSAP arc

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

When “Add to cart” is pressed on a product card, the button gives press feedback, and a copy of the product thumbnail flies along a parabolic arc to the cart icon at the top right, shrinking as it goes; on arrival the cart bounces up and its count badge +1 pops. About 0.75 s, giving clear “added” feedback. (GSAP: tween the flying element's x with power1.in and y with back.in separately to form the arc, with scale 1→0.15; remove it when done and update the badge, whose scale uses back.out(3))

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More card & group effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →