Opus Motion ★ Star on GitHub

HUD · spotlight-dim-focus

Spotlight dim focus

Tutorial overlay: the frame dims except a soft-edged cut-out (rounded rectangle, ellipse or circle) that closes in on a region, glides to the next one with a caption chip on each, then opens back up. Everything outside the cut-out is just a dark veil, so it sits on any footage.

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

Spotlight dim focus: three frames of the HUD graphic, start, middle and end
Spotlight dim focus — start, middle and end of the 9.0-second motion.

What Spotlight dim focus is for

Walk a viewer through parts of a screen recording one region at a time ("first the search bar, then the chart, then save"): pass `regions` (0-1 rects) with captions.

  • spotlight
  • dim
  • focus
  • highlight region
  • vignette
  • annotation
  • tutorial
  • screen recording
  • overlay
  • cut-out
  • attention

Details

Category
HUD & sci-fi interface graphics
Length
9.0 s (270 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
regions
Colour props
dimColor ringColor labelBg labelInk
Mood
photo, editorial, night
Roles
frame, accent
Pairs with
Cursor driver (operated UI), Tooltip pointer, Numbered step badges
Avoid
Replace the sample captions (Start with a search / Read the chart ...).

Use Spotlight dim focus in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add spotlight-dim-focus --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render spotlight-dim-focus --props '{"regions":[{"x":0.1,"y":0.018,"w":0.42,"h":0.052,"shape":"rounded","label":"Start with a search"},{"x":0.1,"y":0.12,"w":0.5,"h":0.38,"shape":"rounded","label":"Read the chart"},{"x":0.39,"y":0.6,"w":0.16,"h":0.1,"shape":"circle","label":"Check this number"},{"x":0.79,"y":0.875,"w":0.13,"h":0.058,"shape":"rounded","label":"Save your work"}],"dimColor":"#05070D","ringColor":"#FFFFFF","labelBg":"#FFFFFF","labelInk":"#12151C"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export spotlight-dim-focus --as webm-alpha --props '{"regions":[{"x":0.1,"y":0.018,"w":0.42,"h":0.052,"shape":"rounded","label":"Start with a search"},{"x":0.1,"y":0.12,"w":0.5,"h":0.38,"shape":"rounded","label":"Read the chart"},{"x":0.39,"y":0.6,"w":0.16,"h":0.1,"shape":"circle","label":"Check this number"},{"x":0.79,"y":0.875,"w":0.13,"h":0.058,"shape":"rounded","label":"Save your work"}],"dimColor":"#05070D","ringColor":"#FFFFFF","labelBg":"#FFFFFF","labelInk":"#12151C"}'

React / Next.js

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

<MotionPlayer
  motion="spotlight-dim-focus"
  props={{
    regions: [
      {
        x: 0.1,
        y: 0.018,
        w: 0.42,
        h: 0.052,
        shape: 'rounded',
        label: 'Start with a search',
      },
      {
        x: 0.1,
        y: 0.12,
        w: 0.5,
        h: 0.38,
        shape: 'rounded',
        label: 'Read the chart',
      },
      {
        x: 0.39,
        y: 0.6,
        w: 0.16,
        h: 0.1,
        shape: 'circle',
        label: 'Check this number',
      },
      {
        x: 0.79,
        y: 0.875,
        w: 0.13,
        h: 0.058,
        shape: 'rounded',
        label: 'Save your work',
      },
    ],
    dimColor: '#05070D',
    ringColor: '#FFFFFF',
    labelBg: '#FFFFFF',
    labelInk: '#12151C',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="spotlight-dim-focus"
  props='{"regions":[{"x":0.1,"y":0.018,"w":0.42,"h":0.052,"shape":"rounded","label":"Start with a search"},{"x":0.1,"y":0.12,"w":0.5,"h":0.38,"shape":"rounded","label":"Read the chart"},{"x":0.39,"y":0.6,"w":0.16,"h":0.1,"shape":"circle","label":"Check this number"},{"x":0.79,"y":0.875,"w":0.13,"h":0.058,"shape":"rounded","label":"Save your work"}],"dimColor":"#05070D","ringColor":"#FFFFFF","labelBg":"#FFFFFF","labelInk":"#12151C"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "spotlight-dim-focus",
      "props": {
        "regions": [
          {
            "x": 0.1,
            "y": 0.018,
            "w": 0.42,
            "h": 0.052,
            "shape": "rounded",
            "label": "Start with a search"
          },
          {
            "x": 0.1,
            "y": 0.12,
            "w": 0.5,
            "h": 0.38,
            "shape": "rounded",
            "label": "Read the chart"
          },
          {
            "x": 0.39,
            "y": 0.6,
            "w": 0.16,
            "h": 0.1,
            "shape": "circle",
            "label": "Check this number"
          },
          {
            "x": 0.79,
            "y": 0.875,
            "w": 0.13,
            "h": 0.058,
            "shape": "rounded",
            "label": "Save your work"
          }
        ],
        "dimColor": "#05070D",
        "ringColor": "#FFFFFF",
        "labelBg": "#FFFFFF",
        "labelInk": "#12151C"
      }
    }
  ]
}

Spotlight dim focus props

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

PropDefaultWhat it does
regions[{"x":0.1,"y":0.018,"w":0.42,"h":0.052,"shape":"rounded","label":"Start with a search"}…array of {x, y, w, h (0-1, x/y = top-left), shape: rounded|circle|ellipse, label?, hold?}
dim0.7veil opacity outside the cut-out (0-1)
dimColor"#05070D"veil colour
feather6edge softness of the cut-out in u
pad14extra margin around each region in u
radius26corner radius of rounded cut-outs in u
ringtruedraw a thin ring around the cut-out
ringColor"#FFFFFF"ring colour
labelBg"#FFFFFF"caption chip fill
labelInk"#12151C"caption chip text colour
fontFamily"stub"CSS font-family for captions
hold38frames to hold on each region
move22frames to glide between regions (also the open / close time)
startAt6frame the veil starts closing in
speed1timing multiplier (2 = twice as fast)
demoBackgroundfalsetrue paints a neutral mock screen behind (previews); false = transparent overlay (only the veil is drawn)
demoTone"light"light | dark mock screen

Notes & credits

Only a dark veil with a cut-out is drawn, so it sits on any footage. regions glide in order; hold/move set the pacing.

Technique sources:

  • screen-recording tutorial annotation