Runtimes · React

Interactive animation in React.

The web runtime package includes an EggPlayer component. Give it the file and the state machine, and get the view back to set inputs and data from your components.

In short

In React or Next.js, render the EggPlayer component from the Ova Motion web runtime with src (the .egg file), machine and fit; onLoad gives you the view to set state machine inputs and view model values, and onEvent receives the file's events. Render it on the client only, since it draws on a canvas.

Platform
React 17 or newer, Next.js (client components)
Binding
EggPlayer component in the web runtime
Draws with
Canvas 2D
Same file everywhere
One .egg plays the same on every runtime
License
MIT or Apache-2.0

The component

Weather.jsxreact
"use client";
import { EggPlayer } from "./player/react.js";

export function Weather({ city, temperature }) {
  return (
    <EggPlayer
      src="/weather.egg"
      machine="weather"
      fit="contain"
      onLoad={(view) => {
        view.player.vm_set_string("city", city);
        view.player.vm_set_number("temperature", temperature);
      }}
      onEvent={(e) => console.log(e)}
    />
  );
}
PropDoes
srcURL, ArrayBuffer or Uint8Array of the .egg
machineState machine to start
artboardArtboard of a bundle
fitcontain, cover, fill, layout, expand or file
renderercanvas or pixels
onLoad, onEventThe view once ready; every event the file reports

In Next.js

Use the component in a client component ("use client"). Keep headings and text in server-rendered HTML so the page is indexed and readable, and let the animation be the picture beside them.

Last checked against the product on 2026-10-15.

Examples you can play

All templates

Questions

Does it work with server-side rendering?

Render the component on the client. The rest of your page can stay server-rendered.

Is there a React Native component?

Not yet. React Native apps can use the native runtimes through a bridge, or a web view.

What can my code change at run time?

State machine inputs (booleans, numbers, triggers), view model properties bound in the file (text, numbers, colours, enums, pictures, lists), and pictures, sounds and fonts handed over by your app. Your code also reads the current state and the events the file reports.

Is the runtime free to use in commercial apps?

Yes. The runtimes are licensed MIT or Apache-2.0, and what you make in the editor is yours.

Start with an egg.
Ship an interface.

Open the editor in your browser, or download it for macOS, Windows and Linux.