Opus Motion ★ Star on GitHub

UI · magnet-pin

Magnet pin (board token)

A glossy round magnet (an orange map pin with a white dot and a specular highlight) drops onto a board with a shrinking blurred shadow and a click ripple, slides between labelled spots with a small lift, then sinks (tilts and drops) or lifts off.

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

Magnet pin (board token): three frames of the UI animation, start, middle and end
Magnet pin (board token) — start, middle and end of the 7.0-second motion.

What Magnet pin (board token) is for

The hero token on any board or map: you-are-here, a delivery truck, a player piece, a "we are here" marker; pairs with map-route and board-camera.

  • pin
  • magnet
  • token
  • map
  • whiteboard
  • marker
  • location
  • you are here
  • drop
  • slide

Details

Category
UI & product mockup animations
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
—
Colour props
background color ink
Mood
—
Roles
subject

Use Magnet pin (board token) in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render magnet-pin --props '{"background":"#F3F0E9","color":"#F26B2A","ink":"#2A2C31"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export magnet-pin --as mp4 --props '{"background":"#F3F0E9","color":"#F26B2A","ink":"#2A2C31"}'

React / Next.js

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

<MotionPlayer
  motion="magnet-pin"
  props={{background: '#F3F0E9', color: '#F26B2A', ink: '#2A2C31'}}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="magnet-pin"
  props='{"background":"#F3F0E9","color":"#F26B2A","ink":"#2A2C31"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "magnet-pin",
      "props": {
        "background": "#F3F0E9",
        "color": "#F26B2A",
        "ink": "#2A2C31"
      }
    }
  ]
}

Magnet pin (board token) props

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

PropDefaultWhat it does
background"#F3F0E9"board colour
shape"pin"'pin' | 'disc' | 'icon'
color"#F26B2A"magnet colour
ink"#2A2C31"ink for grid, spots and labels
keys[{"frame":24,"x":0.22,"y":0.64,"action":"drop"},{"frame":70,"x":0.5,"y":0.36,"action":"…[{frame, x, y (0-1 fractions), action:'drop'|'slide'|'lift'|'sink'}] in order
spots[{"x":0.22,"y":0.64,"label":"Start"},{"x":0.5,"y":0.36,"label":"Depot"},{"x":0.78,"y":0…[{x, y, label}] labelled places on the board (replace the sample labels)
showRoutetruedotted route between keyed positions
size210pin size in px

Notes & credits

Technique sources:

  • lemo-opuscar styles/whiteboard demo engine (MIT, LemoLab) — drawPinMagnet, own SVG build