180

Scratch Reveal

Scratch off the top layer with the cursor or a finger to reveal what's underneath

Card & groupDrag & gestureUI interactionEmphasisApp UICanvasCanvas erase

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A card covered in a top layer with a metallic gradient texture and the words “Scratch to reveal”; wherever the user drags with the mouse held down or a finger gets scratched off (a thick round brush), revealing the prize or coupon underneath; once more than about half is scratched, the rest of the layer fades out for a full reveal. Good for prize draws, coupons and campaign pages. (Canvas 2D: draw the top layer on a canvas and erase along the drag path with globalCompositeOperation = "destination-out"; periodically sample the transparent ratio with getImageData to decide when to reveal; set touch-action:none on mobile)

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 →