Opus Motion ★ Star on GitHub

UI · glass-lesson-card

Glass lesson cards

Frosted-glass lesson cards float top-left over an open textbook on a felt desk — red-brown letter-spaced eyebrow, serif heading, body / key-word list / ticked checklist — and swap LESSON → EQUATION → KEY WORDS → PREDICT → WHY? with a crossfade and an 8 px upward drift. Backdrop "none" turns it into a transparent overlay.

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

Glass lesson cards: three frames of the UI animation, start, middle and end
Glass lesson cards — start, middle and end of the 8.0-second motion.

What Glass lesson cards is for

Lesson, step and definition overlays for educational explainers, product tours and course trailers; the card system of an "interactive lesson" video.

  • glass
  • frosted
  • card
  • lesson
  • education
  • textbook
  • explainer
  • definition
  • quiz
  • checklist
  • equation
  • serif
  • overlay
  • ui
  • backdrop-blur
  • course

Details

Category
UI & product mockup animations
Length
8.0 s (240 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
cards
Colour props
eyebrowColor headingColor bodyColor tickColor
Mood
editorial, ui
Roles
accent, subject

Use Glass lesson cards in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render glass-lesson-card --props '{"cards":[{"eyebrow":"Lesson 1","heading":"Energy stores","body":["When something changes, energy moves from one store to another.","Energy is not a substance: the stores are a model that helps us keep count."]},{"eyebrow":"The equation","heading":"E_p = m g h","body":["Gravitational store = mass × field strength × height.","Lift it twice as high and it stores twice as much."]},{"eyebrow":"Key words","heading":"Words to know","items":[{"term":"system","def":"An object or group of objects."},{"term":"energy store","def":"A way a system holds energy."},{"term":"pathway","def":"How energy moves between stores."},{"term":"joule (J)","def":"The unit of energy."}]},{"eyebrow":"Predict","heading":"The book falls and lands. Where is its energy now?","checklist":["It has been used up","In the thermal stores around it","Still in its gravitational store"],"tick":1},{"eyebrow":"Why?","heading":"Nothing is used up","body":["As it falls, the gravitational store empties into the kinetic store; on landing the energy spreads out as warmth and sound."]}],"eyebrowColor":"#683836","headingColor":"#22211A","bodyColor":"#3B3B38","tickColor":"#2E7D3A"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export glass-lesson-card --as webm-alpha --props '{"cards":[{"eyebrow":"Lesson 1","heading":"Energy stores","body":["When something changes, energy moves from one store to another.","Energy is not a substance: the stores are a model that helps us keep count."]},{"eyebrow":"The equation","heading":"E_p = m g h","body":["Gravitational store = mass × field strength × height.","Lift it twice as high and it stores twice as much."]},{"eyebrow":"Key words","heading":"Words to know","items":[{"term":"system","def":"An object or group of objects."},{"term":"energy store","def":"A way a system holds energy."},{"term":"pathway","def":"How energy moves between stores."},{"term":"joule (J)","def":"The unit of energy."}]},{"eyebrow":"Predict","heading":"The book falls and lands. Where is its energy now?","checklist":["It has been used up","In the thermal stores around it","Still in its gravitational store"],"tick":1},{"eyebrow":"Why?","heading":"Nothing is used up","body":["As it falls, the gravitational store empties into the kinetic store; on landing the energy spreads out as warmth and sound."]}],"eyebrowColor":"#683836","headingColor":"#22211A","bodyColor":"#3B3B38","tickColor":"#2E7D3A"}'

React / Next.js

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

<MotionPlayer
  motion="glass-lesson-card"
  props={{
    cards: [
      {
        eyebrow: 'Lesson 1',
        heading: 'Energy stores',
        body: [
          'When something changes, energy moves from one store to another.',
          'Energy is not a substance: the stores are a model that helps us keep count.',
        ],
      },
      {
        eyebrow: 'The equation',
        heading: 'E_p = m g h',
        body: [
          'Gravitational store = mass × field strength × height.',
          'Lift it twice as high and it stores twice as much.',
        ],
      },
      {
        eyebrow: 'Key words',
        heading: 'Words to know',
        items: [
          {term: 'system', def: 'An object or group of objects.'},
          {term: 'energy store', def: 'A way a system holds energy.'},
          {term: 'pathway', def: 'How energy moves between stores.'},
          {term: 'joule (J)', def: 'The unit of energy.'},
        ],
      },
      {
        eyebrow: 'Predict',
        heading: 'The book falls and lands. Where is its energy now?',
        checklist: [
          'It has been used up',
          'In the thermal stores around it',
          'Still in its gravitational store',
        ],
        tick: 1,
      },
      {
        eyebrow: 'Why?',
        heading: 'Nothing is used up',
        body: [
          'As it falls, the gravitational store empties into the kinetic store; on landing the energy spreads out as warmth and sound.',
        ],
      },
    ],
    eyebrowColor: '#683836',
    headingColor: '#22211A',
    bodyColor: '#3B3B38',
    tickColor: '#2E7D3A',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="glass-lesson-card"
  props='{"cards":[{"eyebrow":"Lesson 1","heading":"Energy stores","body":["When something changes, energy moves from one store to another.","Energy is not a substance: the stores are a model that helps us keep count."]},{"eyebrow":"The equation","heading":"E_p = m g h","body":["Gravitational store = mass × field strength × height.","Lift it twice as high and it stores twice as much."]},{"eyebrow":"Key words","heading":"Words to know","items":[{"term":"system","def":"An object or group of objects."},{"term":"energy store","def":"A way a system holds energy."},{"term":"pathway","def":"How energy moves between stores."},{"term":"joule (J)","def":"The unit of energy."}]},{"eyebrow":"Predict","heading":"The book falls and lands. Where is its energy now?","checklist":["It has been used up","In the thermal stores around it","Still in its gravitational store"],"tick":1},{"eyebrow":"Why?","heading":"Nothing is used up","body":["As it falls, the gravitational store empties into the kinetic store; on landing the energy spreads out as warmth and sound."]}],"eyebrowColor":"#683836","headingColor":"#22211A","bodyColor":"#3B3B38","tickColor":"#2E7D3A"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "glass-lesson-card",
      "props": {
        "cards": [
          {
            "eyebrow": "Lesson 1",
            "heading": "Energy stores",
            "body": [
              "When something changes, energy moves from one store to another.",
              "Energy is not a substance: the stores are a model that helps us keep count."
            ]
          },
          {
            "eyebrow": "The equation",
            "heading": "E_p = m g h",
            "body": [
              "Gravitational store = mass × field strength × height.",
              "Lift it twice as high and it stores twice as much."
            ]
          },
          {
            "eyebrow": "Key words",
            "heading": "Words to know",
            "items": [
              {
                "term": "system",
                "def": "An object or group of objects."
              },
              {
                "term": "energy store",
                "def": "A way a system holds energy."
              },
              {
                "term": "pathway",
                "def": "How energy moves between stores."
              },
              {
                "term": "joule (J)",
                "def": "The unit of energy."
              }
            ]
          },
          {
            "eyebrow": "Predict",
            "heading": "The book falls and lands. Where is its energy now?",
            "checklist": [
              "It has been used up",
              "In the thermal stores around it",
              "Still in its gravitational store"
            ],
            "tick": 1
          },
          {
            "eyebrow": "Why?",
            "heading": "Nothing is used up",
            "body": [
              "As it falls, the gravitational store empties into the kinetic store; on landing the energy spreads out as warmth and sound."
            ]
          }
        ],
        "eyebrowColor": "#683836",
        "headingColor": "#22211A",
        "bodyColor": "#3B3B38",
        "tickColor": "#2E7D3A"
      }
    }
  ]
}

Glass lesson cards props

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

PropDefaultWhat it does
cards[{"eyebrow":"Lesson 1","heading":"Energy stores","body":["When something changes, energ…list of {eyebrow, heading, body?: string[], items?: [{term, def}], checklist?: string[], tick?: index}; "E_p" in a heading renders a subscript
startAt6frame the first card fades in
holdFrames45frames each card stays before the next replaces it (the last one holds to the end)
position"top-left"top-left | top-right | bottom-left | bottom-right (portrait always centres the card at the top)
width660card width in u (clamped to the frame)
backdrop"book""book" procedural textbook spread on a felt desk | "none" = transparent overlay (CSS backdrop blur over host content)
drift0.03slow camera push on the backdrop over the whole clip (0.03 = 3 %)
eyebrowColor"#683836"eyebrow (small caps) colour
headingColor"#22211A"heading colour
bodyColor"#3B3B38"body text colour
tickColor"#2E7D3A"checklist tick colour
background"transparent"colour behind the cards when backdrop is "none" ("transparent" to overlay)

Notes & credits

Technique sources:

  • video x3 13.9-22.0 (glass-lesson-card)