Opus Motion ★ Star on GitHub

UI · ui-shape-morph

UI shape morph (one shape, many states)

One rounded rectangle never cuts: it grows from a button into a loader, a check, a pill, a player, a slider, a toggle, tabs, a chart, a search box and a toast and back, one change per beat on spring physics (leading edges stiffer than trailing edges so it stretches), content cross-blurring inside while the camera keeps the active state framed; the last frame equals the first.

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

UI shape morph (one shape, many states): three frames of the UI animation, start, middle and end
UI shape morph (one shape, many states) — start, middle and end of the 6.8-second motion.

What UI shape morph (one shape, many states) is for

Product promos, app-store previews, onboarding heroes and "what our app does" loops: edit the `states` table (kind, label, size, radius, colour), set `accent` and `beatFrames` to your music; pairs with cursor-driver.

  • ui
  • morph
  • shape morph
  • button
  • loader
  • toggle
  • slider
  • tabs
  • toast
  • player
  • search
  • chart
  • app
  • product promo
  • app store
  • onboarding
  • spring
  • loop
  • interface

Details

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

Use UI shape morph (one shape, many states) in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render ui-shape-morph --props '{"accent":"#4F5BD5","background":"#EDEBE7","ink":"#17171B"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export ui-shape-morph --as mp4 --props '{"accent":"#4F5BD5","background":"#EDEBE7","ink":"#17171B"}'

React / Next.js

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

<MotionPlayer
  motion="ui-shape-morph"
  props={{accent: '#4F5BD5', background: '#EDEBE7', ink: '#17171B'}}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="ui-shape-morph"
  props='{"accent":"#4F5BD5","background":"#EDEBE7","ink":"#17171B"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "ui-shape-morph",
      "props": {
        "accent": "#4F5BD5",
        "background": "#EDEBE7",
        "ink": "#17171B"
      }
    }
  ]
}

UI shape morph (one shape, many states) props

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

PropDefaultWhat it does
states[{"kind":"button","label":"Get started","width":300,"height":96,"radius":48,"color":"#4…[{kind:'button'|'loader'|'check'|'pill'|'player'|'slider'|'toggle'|'tabs'|'chart'|'search'|'toast', label, width, height, radius (u), color, content?, action? (toast button word, default 'Undo')}] — end with a copy of the first state to loop
accent"#4F5BD5"accent used inside sliders, charts, search caret
background"#EDEBE7"canvas colour (warm grey or near-black)
ink"#17171B"text colour on light states
fontFamily""UI font family (empty = Inter)
beatFrames15frames per state change (15 = 120 BPM)
startFrame10frame of the first change
frameFill0.6fraction of the frame the active state fills (0.6)
cursortrueshow a small cursor that operates each state

Notes & credits

Technique sources:

  • prompt-corpus: ui-shape-morph (22 cases)
  • awesome-opus5-5-videos prompts (MIT) — technique only