Rupamotion Player

@rupamotion/player · v0.1 · MIT

Your CSS animation, now with a remote control.

A 3.6 KB player for the animations Rupamotion exports. States, hover, click and in-view triggers, play, pause, seek, speed and events, on plain CSS that already runs without JavaScript.

Get started
npm i @rupamotion/player
Design one in Rupamotion →
Oct 14–15 · Lisbon & online

Kinetic Summit 2027

Two days of motion, interfaces and the people who build them.
Get your pass
See the speakers
A
M
J
K
40+ speakers
import { mount } from "@rupamotion/player";

const player = mount(document.querySelector(".event-hero"));
player.play("drift");

How it works

  1. 1

    Design

    Animate HTML, CSS and SVG on a timeline in Rupamotion.

  2. 2

    Export

    Plain CSS animations, plus a small table of states and triggers.

  3. 3

    Play

    The player drives the browser's own animations: play, pause, seek, speed.

No keyframes shipped twice. Nothing evaluated per frame.

Three ways to use it

Ways to use the player

Your markup + a file. Keep your own headings and text, for search engines and a CMS. A .rupaplay file adds the design and the animation.

<rupa-player src="/hero.rupaplay" markup="keep">
	<div class="hero-root">
		<h1 class="hero-title">Your own, editable heading</h1>
	</div>
</rupa-player>
<script type="module" src="https://cdn.jsdelivr.net/npm/@rupamotion/player@0.1.0/dist/element.js"></script>
Read the guide →

The full snippet. Paste the export's markup and CSS; add the player when you want control. No build step.

import { mount } from "@rupamotion/player";

const player = mount(document.querySelector(".hero-root"));
player.on("statechange", (event) => console.log(event.state));
player.play("hover");
Read the guide →

The file alone. Drop in one element: it loads the file, writes the markup and CSS and mounts the player.

<rupa-player src="/hero.rupaplay" cloak></rupa-player>
<script type="module" src="https://cdn.jsdelivr.net/npm/@rupamotion/player@0.1.0/dist/element.js"></script>

<script>
	const el = document.querySelector("rupa-player");
	el.addEventListener("rupaready", () => el.player.play());
</script>
Read the guide →

Works where you work

A React component is included; everything else uses the <rupa-player> element.

Built not to break your page

  • Never throws into your page

    Every entry point is guarded. An internal error makes that one player inert, and the CSS goes on playing.

  • Safe with files from anywhere

    Files are sanitised, checked with integrity, and run under a strict CSP and Trusted Types.

  • Tested in Chromium, Firefox and WebKit

    100 % coverage, and the file reader is fuzzed.

  • No telemetry

    No request you did not ask for: only the .rupaplay file you point it at, and its fonts.

  • 3.6 KB the core, gzipped
  • 4.6 KB more for /file
  • Safari 15.4+ and every evergreen browser
  • 0 network requests of its own

Made for you and your AI: a typed API, every page also as Markdown, and llms.txt and llms-full.txt

Make the animation in Rupamotion, ship it with the player.