Opus Motion ★ Star on GitHub

Product · size-color-picker

Size & colour variant picker

A product picture with colour swatches and size chips that are tapped in turn: the picture re-tints, the chosen chip fills, the price rolls to the new value and the add button wakes up.

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

Size & colour variant picker: three frames of the product animation, start, middle and end
Size & colour variant picker — start, middle and end of the 5.0-second motion.

What Size & colour variant picker is for

Product-page UI demos, variant selection explainers, fashion / merch store promos — set the swatches, sizes, surcharges, price and optional per-colour images.

  • ecommerce
  • variant
  • size
  • color
  • swatch
  • picker
  • product page
  • price
  • fashion
  • store
  • retail
  • ui
  • configurator

Details

Category
Product & e-commerce animations
Length
5.0 s (150 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
—
Colour props
background card ink accent
Image props
images
Mood
photo, ui
Roles
subject

Use Size & colour variant picker in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add size-color-picker --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render size-color-picker --props '{"background":"#F2F0EB","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","images":[]}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export size-color-picker --as webm-alpha --props '{"background":"#F2F0EB","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","images":[]}'

React / Next.js

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

<MotionPlayer
  motion="size-color-picker"
  props={{
    background: '#F2F0EB',
    card: '#FFFFFF',
    ink: '#1D1B24',
    accent: '#E8553A',
    images: [],
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="size-color-picker"
  props='{"background":"#F2F0EB","card":"#FFFFFF","ink":"#1D1B24","accent":"#E8553A","images":[]}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "size-color-picker",
      "props": {
        "background": "#F2F0EB",
        "card": "#FFFFFF",
        "ink": "#1D1B24",
        "accent": "#E8553A",
        "images": []
      }
    }
  ]
}

Size & colour variant picker props

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

PropDefaultWhat it does
productName"Everyday Tee"product title
currency"$"currency prefix
basePrice28price before size surcharges
colors[{"name":"Coral","hex":"#E07A5F"},{"name":"Sage","hex":"#81B29A"},{"name":"Ocean","hex"…swatches [{name, hex}] (the procedural product takes the swatch colour)
sizes[{"label":"S"},{"label":"M"},{"label":"L","delta":2},{"label":"XL","delta":4}]size chips [{label, delta?}] — delta = price surcharge
colorPicks[1,3]swatch indexes tapped over time (one every ~1.5 s)
sizePicks[1,3]size indexes tapped over time
images[]optional per-colour product images (public/ path or https URL, same order as colors); empty = procedural
productKind7procedural drawing: 0 bag, 1 mug, 2 headphones, 3 box, 4 bottle, 5 watch, 6 lamp, 7 t-shirt
colorLabel"Colour"label before the colour name
sizeLabel"Size"label before the size
buttonLabel"Add to cart"button text once a size is chosen
selectLabel"Select a size"button text before a size is chosen
background"#F2F0EB"page colour or 'transparent'
card"#FFFFFF"panel and chip colour
ink"#1D1B24"text colour
accent"#E8553A"price and button colour
startAt0frame the scene starts

Notes & credits

Technique sources:

  • original (round 3)