Opus Motion ★ Star on GitHub

UI · toast-stack-loop

Toast stack loop

App toast notifications slide in one by one, stack with success / error / warning / info icons, count down their dismiss bar and slide out again — a seamless loop over a faint app wireframe.

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

Toast stack loop: three frames of the UI animation, start, middle and end
Toast stack loop — start, middle and end of the 8.0-second motion.

What Toast stack loop is for

Product demos of feedback and notifications, a UX-patterns explainer, loading/err states for websites, or an overlay that makes a screenshot feel alive.

  • toast
  • notification
  • snackbar
  • alert
  • ui
  • app
  • website
  • stack
  • feedback
  • loop
  • overlay
  • success
  • error
  • popup

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
yes
Text props
toasts
Colour props
background ink accent errorColor warningColor infoColor
Mood
blueprint, ui
Roles
accent, subject
Pairs with
Browser mockup with living hero, Device mockup (phone, tablet, laptop, watch), Success / error check burst

Use Toast stack loop in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render toast-stack-loop --props '{"toasts":[{"type":"success","title":"Changes saved","message":"Your profile was updated."},{"type":"info","title":"New version available","message":"Refresh to get the latest features."},{"type":"warning","title":"Storage almost full","message":"92% of your plan is used."},{"type":"error","title":"Payment failed","message":"Check your card details and try again."}],"background":"#EEF1F7","ink":"#1B2233","accent":"#18B26B","errorColor":"#F0506E","warningColor":"#F5A524","infoColor":"#4F6BFF"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export toast-stack-loop --as webm-alpha --props '{"toasts":[{"type":"success","title":"Changes saved","message":"Your profile was updated."},{"type":"info","title":"New version available","message":"Refresh to get the latest features."},{"type":"warning","title":"Storage almost full","message":"92% of your plan is used."},{"type":"error","title":"Payment failed","message":"Check your card details and try again."}],"background":"#EEF1F7","ink":"#1B2233","accent":"#18B26B","errorColor":"#F0506E","warningColor":"#F5A524","infoColor":"#4F6BFF"}'

React / Next.js

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

<MotionPlayer
  motion="toast-stack-loop"
  props={{
    toasts: [
      {
        type: 'success',
        title: 'Changes saved',
        message: 'Your profile was updated.',
      },
      {
        type: 'info',
        title: 'New version available',
        message: 'Refresh to get the latest features.',
      },
      {
        type: 'warning',
        title: 'Storage almost full',
        message: '92% of your plan is used.',
      },
      {
        type: 'error',
        title: 'Payment failed',
        message: 'Check your card details and try again.',
      },
    ],
    background: '#EEF1F7',
    ink: '#1B2233',
    accent: '#18B26B',
    errorColor: '#F0506E',
    warningColor: '#F5A524',
    infoColor: '#4F6BFF',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="toast-stack-loop"
  props='{"toasts":[{"type":"success","title":"Changes saved","message":"Your profile was updated."},{"type":"info","title":"New version available","message":"Refresh to get the latest features."},{"type":"warning","title":"Storage almost full","message":"92% of your plan is used."},{"type":"error","title":"Payment failed","message":"Check your card details and try again."}],"background":"#EEF1F7","ink":"#1B2233","accent":"#18B26B","errorColor":"#F0506E","warningColor":"#F5A524","infoColor":"#4F6BFF"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "toast-stack-loop",
      "props": {
        "toasts": [
          {
            "type": "success",
            "title": "Changes saved",
            "message": "Your profile was updated."
          },
          {
            "type": "info",
            "title": "New version available",
            "message": "Refresh to get the latest features."
          },
          {
            "type": "warning",
            "title": "Storage almost full",
            "message": "92% of your plan is used."
          },
          {
            "type": "error",
            "title": "Payment failed",
            "message": "Check your card details and try again."
          }
        ],
        "background": "#EEF1F7",
        "ink": "#1B2233",
        "accent": "#18B26B",
        "errorColor": "#F0506E",
        "warningColor": "#F5A524",
        "infoColor": "#4F6BFF"
      }
    }
  ]
}

Toast stack loop props

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

PropDefaultWhat it does
toasts[{"type":"success","title":"Changes saved","message":"Your profile was updated."},{"typ…array of {type: success|error|warning|info, title, message?} (up to 6)
position"bottom-right"bottom-right | top-right | bottom-center | top-center
theme"light"light | dark toast cards
life84frames each toast stays before auto-dismiss (shrinks automatically to fit the loop)
stagger34frames between toast arrivals
showPagetruedraw a faint app wireframe behind the toasts
background"#EEF1F7"frame colour, or "transparent" to overlay content
surfaceColor"auto"toast card colour, or "auto"
ink"#1B2233"text colour
accent"#18B26B"success colour
errorColor"#F0506E"error colour
warningColor"#F5A524"warning colour
infoColor"#4F6BFF"info colour
fontFamily"auto"CSS font family, or "auto"

Notes & credits

Empty at the first and last frame; with background transparent and showPage false it overlays a screenshot or UI.

Technique sources:

  • original