Opus Motion ★ Star on GitHub

Product · coupon-scratch-reveal

Coupon scratch card reveal

A coupon ticket with a foil window: a coin scratches back and forth with flying flakes until the discount code is revealed with a pop and confetti, then a "Copy code" button is tapped and turns to "Copied".

A free, MIT-licensed product animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Coupon scratch card reveal: three frames of the product animation, start, middle and end
Coupon scratch card reveal — start, middle and end of the 5.7-second motion.

What Coupon scratch card reveal is for

Promo codes, giveaways, loyalty rewards, black-friday teasers, app-store discount beats — set the headline, discount, code and colours.

  • coupon
  • scratch
  • promo code
  • discount
  • voucher
  • reward
  • ecommerce
  • retail
  • sale
  • reveal
  • giveaway
  • ticket

Details

Category
Product & e-commerce animations
Length
5.7 s (170 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title caption
Colour props
background card ink accent foil
Mood
playful
Roles
accent

Use Coupon scratch card reveal in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add coupon-scratch-reveal --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render coupon-scratch-reveal --props '{"title":"Your reward","caption":"On your next order","background":"#F1ECE3","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","foil":"#B8BCC8"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export coupon-scratch-reveal --as webm-alpha --props '{"title":"Your reward","caption":"On your next order","background":"#F1ECE3","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","foil":"#B8BCC8"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="coupon-scratch-reveal"
  props={{
    title: 'Your reward',
    caption: 'On your next order',
    background: '#F1ECE3',
    card: '#FFFFFF',
    ink: '#1D1B24',
    accent: '#E8553A',
    foil: '#B8BCC8',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="coupon-scratch-reveal"
  props='{"title":"Your reward","caption":"On your next order","background":"#F1ECE3","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","foil":"#B8BCC8"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "coupon-scratch-reveal",
      "props": {
        "title": "Your reward",
        "caption": "On your next order",
        "background": "#F1ECE3",
        "card": "#FFFFFF",
        "ink": "#1D1B24",
        "accent": "#E8553A",
        "foil": "#B8BCC8"
      }
    }
  ]
}

Coupon scratch card reveal props

16 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
title"Your reward"small caps line on the top band
discountLabel"20% OFF"big offer text on the top band
code"SAVE20"the hidden coupon code
hint"SCRATCH HERE"text printed on the foil
caption"On your next order"line under the window
terms"Minimum spend applies. One use per customer."fine print under the caption
copyLabel"Copy code"button text before the tap
copiedLabel"Copied"button text after the tap
rows5how many scratch sweeps (2-8)
background"#F1ECE3"page colour or 'transparent'
card"#FFFFFF"ticket body colour
ink"#1D1B24"text colour
accent"#E8553A"top band and confetti colour
foil"#B8BCC8"scratch foil base colour
startAt0frame the ticket starts entering
speed1timing multiplier (1 = default)

Notes & credits

Technique sources:

  • original (round 3)