Opus Motion ★ Star on GitHub

UI · device-mockup

Device mockup (phone, tablet, laptop, watch)

A CSS-built phone, android, tablet, laptop or watch with your screen content (a picture, a tall screenshot that scrolls, or a built-in app UI): it tilts in from 25 degrees and settles on a soft floor shadow, sways gently, then flips over to show a second panel while an optional headline fades in beside it.

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

Device mockup (phone, tablet, laptop, watch): three frames of the UI animation, start, middle and end
Device mockup (phone, tablet, laptop, watch) — start, middle and end of the 6.0-second motion.

What Device mockup (phone, tablet, laptop, watch) is for

App launches, feature tours, testimonials, store previews: makes a host screenshot look shipped. Pass `src` (and `src2` for the flip side) and `device`.

  • device
  • mockup
  • phone
  • iphone
  • android
  • tablet
  • laptop
  • watch
  • app
  • screenshot
  • scroll
  • flip
  • product
  • launch
  • app store
  • css 3d
  • tilt
  • ui
  • testimonial

Details

Category
UI & product mockup animations
Length
6.0 s (180 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
headline brand
Colour props
bodyColor accent background background2 textColor
Image props
src
Mood
photo, 3d, ui
Roles
subject

Use Device mockup (phone, tablet, laptop, watch) in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render device-mockup --props '{"headline":"","brand":"Lumen","bodyColor":"#1c1e26","accent":"#4f6bff","background":"#dfe5f5","background2":"#b9c4e6","textColor":"#16203f","src":""}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export device-mockup --as mp4 --props '{"headline":"","brand":"Lumen","bodyColor":"#1c1e26","accent":"#4f6bff","background":"#dfe5f5","background2":"#b9c4e6","textColor":"#16203f","src":""}'

React / Next.js

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

<MotionPlayer
  motion="device-mockup"
  props={{
    headline: '',
    brand: 'Lumen',
    bodyColor: '#1c1e26',
    accent: '#4f6bff',
    background: '#dfe5f5',
    background2: '#b9c4e6',
    textColor: '#16203f',
    src: '',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="device-mockup"
  props='{"headline":"","brand":"Lumen","bodyColor":"#1c1e26","accent":"#4f6bff","background":"#dfe5f5","background2":"#b9c4e6","textColor":"#16203f","src":""}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "device-mockup",
      "props": {
        "headline": "",
        "brand": "Lumen",
        "bodyColor": "#1c1e26",
        "accent": "#4f6bff",
        "background": "#dfe5f5",
        "background2": "#b9c4e6",
        "textColor": "#16203f",
        "src": ""
      }
    }
  ]
}

Device mockup (phone, tablet, laptop, watch) props

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

PropDefaultWhat it does
device"iphone"'iphone' | 'android' | 'tablet' | 'laptop' | 'watch'
src""screen image (public/ path or URL); empty = built-in app UI
src2""image on the flip side (default: reuse src, or the second built-in panel)
fit"cover"'cover' (fill the screen) | 'scroll' (fit width and scroll a tall screenshot)
scroll[0,1][from, to] scroll position 0..1 of the overflow (tall screenshot or built-in list)
scrollFrames[26,96][start, end] frames of the scroll
tilt25entry rotateY in degrees (25 -> 0)
flipAt112frame the device flips to its second panel (0 = never)
headline""optional headline beside / above the device
subline""optional sub line under the headline
bodyColor"#1c1e26"device body colour
accent"#4f6bff"accent colour of the built-in UI (and watch strap)
background"#dfe5f5"backdrop colour
background2"#b9c4e6"backdrop edge colour
textColor"#16203f"headline colour
size1device size multiplier
brand"Lumen"name shown in the built-in UI
statusTime"9:41"clock text in the phone status bar and on the watch face
greeting"Good morning"small greeting above the app title (phone / tablet / android UI)
appSuffix"Today"word after the brand in the app title ("<brand> <appSuffix>")
goal78goal ring percentage 0-100 (ring fill and the number inside)
goalLabel"Daily goal"small label in the goal card
goalTitle"On track"big word in the goal card
goalNote"3 of 4 habits done"note under the goal title
stats[["Streak","12 d"],["Score","864"],["Rank","#3"]]three small stat tiles [label, value]
activityTitle"Activity"heading of the activity list
activityRows[["Morning run","5.2 km","#ff8a5b"],["Focus block","2 h 10 m","#6c8cff"],["Water","1.8 …activity list rows [name, value, icon colour (optional)]
rowDays["Today","Yesterday"][even-row tag, odd-row tag] shown under each activity name
weekLabel"This week"small label above the big number on the second phone panel
weekValue"41.2 h"big number on the second phone panel
weekDelta"+12% vs last week"green delta line on the second phone panel
weekBars[0.45,0.7,0.55,0.9,0.62,0.38,0.8]bar heights 0..1 on the second phone panel
weekDays["M","T","W","T","F","S","S"]one label under each bar
highlightsTitle"Highlights"heading above the highlight chips
highlights["Best focus day: Thursday","Longest streak: 12 days","New personal record"]highlight chip texts on the second phone panel
dashMenu["Overview","Reports","Customers","Billing","Settings"]laptop dashboard sidebar items
dashTitles["Overview","Reports"][front, back] page heading of the laptop dashboard
dashStats[["Revenue","$84.2k"],["Users","12,480"],["Growth","+18%"]]laptop dashboard stat cards [label, value]
dashChartTitle"Monthly activity"title of the laptop dashboard bar chart
dashBars[0.4,0.62,0.5,0.8,0.66,0.9,0.74,0.95,0.7,0.55,0.78,0.86]laptop dashboard bar heights 0..1
watchLabel"Heart rate"label on the second watch panel
watchValue"72"big number on the second watch panel
watchUnit"bpm"unit under the watch number

Notes & credits

Technique sources:

  • prompt corpus x18 (device frame with real screen content, 3D tilt entry, flip to second panel)