Opus Motion ★ Star on GitHub

UI · ai-chat-streaming

AI chat streaming

A generic AI assistant chat: the prompt types into the input bar and sends as a bubble, a thinking indicator bounces, then the answer streams in token by token with a block cursor, **bold** and `code` styling, a stop pill and a token / time readout.

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

AI chat streaming: three frames of the UI animation, start, middle and end
AI chat streaming — start, middle and end of the 11.0-second motion.

What AI chat streaming is for

AI assistant / copilot / chatbot promos, "how LLMs generate text" explainers, prompt-and-response demos, support-bot and agent product videos. Swap prompt, answer and names for any product.

  • ai
  • chat
  • chatbot
  • assistant
  • llm
  • streaming
  • tokens
  • prompt
  • gpt
  • copilot
  • conversation
  • typing
  • generative
  • agent
  • ui

Details

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

Use AI chat streaming in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render ai-chat-streaming --props '{"background":"#0C0F16","panel":"#151A25","ink":"#EAEFF8","accent":"#4C8DFF","accent2":"#B07CFF"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export ai-chat-streaming --as webm-alpha --props '{"background":"#0C0F16","panel":"#151A25","ink":"#EAEFF8","accent":"#4C8DFF","accent2":"#B07CFF"}'

React / Next.js

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

<MotionPlayer
  motion="ai-chat-streaming"
  props={{
    background: '#0C0F16',
    panel: '#151A25',
    ink: '#EAEFF8',
    accent: '#4C8DFF',
    accent2: '#B07CFF',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="ai-chat-streaming"
  props='{"background":"#0C0F16","panel":"#151A25","ink":"#EAEFF8","accent":"#4C8DFF","accent2":"#B07CFF"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "ai-chat-streaming",
      "props": {
        "background": "#0C0F16",
        "panel": "#151A25",
        "ink": "#EAEFF8",
        "accent": "#4C8DFF",
        "accent2": "#B07CFF"
      }
    }
  ]
}

AI chat streaming props

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

PropDefaultWhat it does
userName"You"name of the person (reserved label)
assistantName"Assistant"assistant name shown in the header and over the answer
prompt"Explain how a hash table works in two sentences."the user message (typed into the input bar, then sent)
answer"A hash table stores **key–value pairs** in an array of buckets. A hash function turns …the assistant reply; use **bold**, `code` and \n for line breaks
placeholder"Message the assistant…"input bar placeholder text
tokensPerSecond24average streaming speed
showStatstrueshow the token / time readout when the answer ends
thinkingFrames26frames of the thinking indicator before the first token
speed1timing multiplier
startAt0frame the chat starts
background"#0C0F16"page colour or 'transparent'
panel"#151A25"chat window colour
ink"#EAEFF8"text colour
accent"#4C8DFF"user bubble / cursor colour
accent2"#B07CFF"assistant avatar colour
fontFamily""text font override (empty = Inter)

Notes & credits

Technique sources:

  • original (generic AI explainer)