Website animation with AI · open and free

Website animations that come out ready from a prompt

One prompt template, five interactive pieces in the INEMA style and a short video of each one. Copy, adapt and use.

INEMA Motion Lab banner: website animations from a single prompt
In short

INEMA Motion Lab teaches you how to ask an AI (Claude, Codex or another one) for website animations and get something with a professional finish, not a generic effect. It brings a three-part prompt template (appearance, motion and rules) and five real examples made with it: a ⌘K search, a features grid, a playable 404 page, a footer with falling letters and a day/night theme button. Each piece is a single HTML file that you open in the browser and paste into your site, and it comes with the prompt that generated it and a short video. It is for anyone who builds pages, guides or courses and wants motion without relying on a heavy library.

What it is

Three things in a single repository

The template is the most valuable part: it is what makes the next animation come out well. The pieces and the videos are the proof that it works.

Prompt template, ⌘K search, bento grid, playable 404, physics footer, day and night

📐 Prompt template

Appearance with exact values, motion in numbered steps with timing in milliseconds, and technical rules that prevent the most common mistakes.

🧩 5 ready-made pieces

One HTML file each, no build step, in INEMA colors and fonts. They work on mobile, with the keyboard and with reduced motion.

🎬 8-second videos

Each piece has a demo mode with a ghost cursor, recorded in WebM and MP4, ready to use as supporting footage in videos and posts.

How it works

From request to video, no magic step

All five pieces went through this same path. The test and the recording are scripts in this repository.

Template→ The piece's PROMPT.md→ AI writes the index.html→ Browser test→ Demo recording→ Your site / your video
The pieces

Five pieces, each with prompt, code and video

The video shows the automatic demo. Click "Open live" to play with the piece right here.

01 · Navigation

⌘K search

no librarykeyboard⌘K / Ctrl+K

The search pill grows and turns into a command palette. Typing filters courses, guides and events, the arrow keys move a sliding highlight and Enter opens the item.

See the prompt (in Portuguese)
loading…
02 · Features section

Bento grid with a sliding frame

no libraryTab moves the frame

"What INEMA.CLUB has" in blocks of different sizes. An amber frame slides to the block under the mouse and the block wakes up with its own mini-animation.

See the prompt (in Portuguese)
loading…
03 · Error page

A 404 that turns into a game

canvasspace / taphigh score saved

"This page ran away." A capybara runs and jumps over bugs while the visitor decides whether to go back to INEMA.CLUB. It starts on autopilot; the first tap hands over control.

See the prompt (in Portuguese)
loading…
04 · Footer

INEMA footer with physics

Matter.jsdrag and throw

The letters I N E M A fall one by one and pile up on the footer floor. You can grab and throw them; "Tidy letters" puts everything back.

See the prompt (in Portuguese)
loading…
05 · Light/dark theme

Day and night

no libraryrole="switch"CSS variables

The theme button is a scene: the sun goes down, the moon comes up, the school windows light up and the capybara falls asleep. The colors of the whole page change along with it.

See the prompt (in Portuguese)
loading…
The template

The prompt in three parts

Copy it, replace what is between < > and paste it into Claude, Codex or any AI that writes code.

Build <WHAT IT IS, in one sentence: the piece + what the person does with it>.

Appearance:
- Background, colors and typography with exact values (hex, font, weight, relative size).
- Layout: where each block goes and how much of the area it takes (%).
- Details that give it personality (outline, shadow, texture, icons).

Motion:
1. <What happens when it enters the screen> — duration in ms, order, delay between items.
2. <What happens when the person interacts> — hover, click, drag, type.
3. <The physical response> — spring, bounce, inertia, the "weight" of things.
4. <The final / resting state>.
5. Demo mode: until someone touches it, a ghost cursor demonstrates the interaction on its own.

Rules:
- Plain JavaScript and CSS, no library (or: "<library> only for <function>").
- A single requestAnimationFrame loop, paused when the piece leaves the screen (IntersectionObserver).
- Animate only transform and opacity; cap devicePixelRatio at 2 on canvas.
- Never hijack page scrolling; keyboard shortcuts only when the piece is focused or under the mouse.
- Accessible: real elements (button, a, input) with visible focus; the keyboard does the same as the mouse.
- prefers-reduced-motion: show the final state, still (describe what it is).
- A single self-contained HTML file.

Why each part matters

PartWithout itWith it
Appearance with exact values"default AI" colors and fontsthe piece comes out looking like the brand
Numbered motion with timingsvague animation, too fast or too slowintentional rhythm, easy to adjust ("step 2 slower")
Demo modenobody finds out it is interactivethe piece explains itself and becomes a video effortlessly
Pause off screenheavy page, drained batteryzero cost when nobody is watching
Don't hijack scrollingthe page "freezes" when the mouse passes over itthe piece lives alongside the rest of the site
Reduced motionpeople who get motion sick suffereveryone sees the content
Requirements

To use the pieces, all you need is a browser

Testing and re-recording the videos requires Node, Playwright and ffmpeg. To just use them, none of that is needed.

Use a piece

Open the piece's index.html in the browser or copy the file into your site.

# no command needed
open pecas/dia-noite/index.html

Local server

To test it like on a real site (and for the scripts), serve the folder over HTTP.

python3 -m http.server 8850 \
  --directory . --bind 127.0.0.1

Test and record

Node 18+, the playwright package and ffmpeg on the system.

npm i playwright
npx playwright install chromium
How to use · step by step

From a ready-made piece to your own animation

Steps 1 to 3 use what is already done. Steps 4 and 5 are for creating a new piece with the template.

1

Download the repository

Everything is static: pieces, prompts, videos and the two scripts.

git clone https://github.com/inematds/inema-motion-lab
cd inema-motion-lab
2

Open a piece and play with it

Each piece starts in demo mode. The first tap, click or key press hands control over to you. Add ?demo=1 to the URL so the demo never stops.

python3 -m http.server 8850 --directory . --bind 127.0.0.1
# open http://127.0.0.1:8850/pecas/busca-cmdk/
# or   http://127.0.0.1:8850/pecas/busca-cmdk/?demo=1
3

Put it on your site

Each piece fills the whole screen of its own file. The simplest way is to embed it in an <iframe>; for a real integration, copy the piece's HTML, CSS and JS into your page and change the texts and links.

<iframe src="pecas/bento-glide/index.html" title="What INEMA.CLUB has"
        style="width:100%;aspect-ratio:16/9;border:0" loading="lazy"></iframe>
4

Create your own piece with the template

Fill in the template (molde/MOLDE-PROMPT-ANIMACAO.md), save it as pecas/<name>/PROMPT.md and ask the AI to write the index.html from it. Use the five PROMPT.md files as examples of the level of detail. To adjust, ask by step number: "in step 1, 80 ms instead of 120".

# example with Claude Code, in the repository folder
claude "Read pecas/minha-peca/PROMPT.md and write pecas/minha-peca/index.html following the prompt."
5

Test and record the video

The test checks, across all pieces: no JavaScript errors, no horizontal scrolling at 1280 and 360 px, the reduced-motion version, and whether the piece locks page scrolling. The recording produces, for each piece, 8 s in WebM and MP4 plus a cover image in videos/.

python3 -m http.server 8850 --directory . --bind 127.0.0.1 &
node tools/testar-pecas.cjs 8850     # 5/5 pieces OK
node tools/gravar-videos.cjs 8850    # OK busca-cmdk: webm 285 KB, mp4 349 KB …
node tools/gravar-videos.cjs 8850 dia-noite   # just one piece
Next steps

What comes next

The lab is ready to use. These are the possible next stages, not done yet.

Done
Template, 5 pieces, tests and videosEverything in this repository, in PT/EN/ES. The template also went into the INEMA guides skill, so the next guides are born with it.
Next
Pieces on the INEMA sites⌘K search on the portal and on buscas, playable 404 on inema.club, bento grid on the guide landing pages.
Later
More pieces and a vertical version of the videosA menu that takes over the screen, a loader that reveals the page, a ring gallery; 9:16 videos for shorts.