Opus Motion ★ Star on GitHub

HUD · zoom-inset-box

Zoom inset box

Tutorial overlay: a dashed box marks a small region, connector lines run from its corners and a magnified inset (a crop of the same picture) grows out of it into a free corner with a zoom badge. Pass the footage frame as `src`; without one it magnifies a built-in mock screen.

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

Zoom inset box: three frames of the HUD graphic, start, middle and end
Zoom inset box — start, middle and end of the 6.0-second motion.

What Zoom inset box is for

Show tiny UI detail legibly in a screen recording (a menu item, a number, a toggle): set `zooms` with the source region, the inset position and a still of the footage in `src`.

  • zoom
  • inset
  • magnify
  • crop
  • detail
  • annotation
  • tutorial
  • screen recording
  • overlay
  • picture in picture
  • connector

Details

Category
HUD & sci-fi interface graphics
Length
6.0 s (180 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
zooms
Colour props
color borderColor labelBg labelInk
Image props
src
Mood
photo
Roles
frame, accent
Pairs with
Cursor driver (operated UI), Hand-drawn arrow callout, Click ripple markers

Use Zoom inset box in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add zoom-inset-box --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render zoom-inset-box --props '{"zooms":[{"region":{"x":0.43,"y":0.2,"w":0.14,"h":0.2},"inset":{"x":0.66,"y":0.15,"w":0.27}}],"color":"#FFD60A","borderColor":"#FFFFFF","labelBg":"#FFD60A","labelInk":"#15171C","src":""}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export zoom-inset-box --as webm-alpha --props '{"zooms":[{"region":{"x":0.43,"y":0.2,"w":0.14,"h":0.2},"inset":{"x":0.66,"y":0.15,"w":0.27}}],"color":"#FFD60A","borderColor":"#FFFFFF","labelBg":"#FFD60A","labelInk":"#15171C","src":""}'

React / Next.js

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

<MotionPlayer
  motion="zoom-inset-box"
  props={{
    zooms: [
      {
        region: {x: 0.43, y: 0.2, w: 0.14, h: 0.2},
        inset: {x: 0.66, y: 0.15, w: 0.27},
      },
    ],
    color: '#FFD60A',
    borderColor: '#FFFFFF',
    labelBg: '#FFD60A',
    labelInk: '#15171C',
    src: '',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="zoom-inset-box"
  props='{"zooms":[{"region":{"x":0.43,"y":0.2,"w":0.14,"h":0.2},"inset":{"x":0.66,"y":0.15,"w":0.27}}],"color":"#FFD60A","borderColor":"#FFFFFF","labelBg":"#FFD60A","labelInk":"#15171C","src":""}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "zoom-inset-box",
      "props": {
        "zooms": [
          {
            "region": {
              "x": 0.43,
              "y": 0.2,
              "w": 0.14,
              "h": 0.2
            },
            "inset": {
              "x": 0.66,
              "y": 0.15,
              "w": 0.27
            }
          }
        ],
        "color": "#FFD60A",
        "borderColor": "#FFFFFF",
        "labelBg": "#FFD60A",
        "labelInk": "#15171C",
        "src": ""
      }
    }
  ]
}

Zoom inset box props

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

PropDefaultWhat it does
zooms[{"region":{"x":0.43,"y":0.2,"w":0.14,"h":0.2},"inset":{"x":0.66,"y":0.15,"w":0.27}}]array of {region:{x,y,w,h}, inset:{x,y,w}, label?, at?}: region = source box (0-1, x/y = top-left), inset = landing spot (x/y top-left, w = width fraction), label overrides the auto "2.5x"
src""public/ path or URL of the frame to magnify (same picture as the footage); empty = mock screen
color"#FFD60A"region box and connector colour
borderColor"#FFFFFF"inset border colour
labelBg"#FFD60A"zoom badge fill
labelInk"#15171C"zoom badge text colour
fontFamily"stub"CSS font-family for the badge
showZoomLabeltrueshow the zoom-factor badge under the inset
startAt10frame of the first zoom
stagger60frames between zooms
speed1animation speed multiplier
exitAt0frame everything fades at (0 = just before the end)
demoBackgroundfalsetrue paints a neutral mock screen behind (previews); false = transparent overlay (the inset still shows its crop)
demoTone"light"light | dark mock screen

Notes & credits

Pass src = a still of the same footage frame so the inset magnifies the real picture; without src it magnifies the built-in mock screen.

Technique sources:

  • screen-recording tutorial annotation