Rive animation for React
Shows how to add Rive animations to web and React apps, so they load fast, respond to input and stay accessible.
What we improved
Fixed the button example: it now reads a `click` trigger input and fires it, as the example promised, and fires it from `onClick` so mouse, touch and keyboard all work. Wrapped the Rive button canvas in a real `<button>` with an `aria-label
Improved by YourAISkill from the original by TerminalSkills, under its Apache-2.0 licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.
Claude's review
8/10 Version-checked Rive web and React guide with renderer choice, WASM self-hosting, data binding, accessible button pattern and a troubleshooting table.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Build interactive animations with Rive — load .riv files, control state machines, respond to user input, and embed runtime animations in web and mobile apps. Use when tasks involve interactive UI animations, character animations with state logic, animated icons with hover/click states, or game-like interactions in production apps.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: rive
description: >-
Embed and drive Rive (.riv) animations on the web and in React. Covers picking
the canvas or WebGL2 runtime, sizing the canvas with Layout, Fit and Alignment,
controlling a graphic through Data Binding view models (or the older state
machine inputs that existing files still use), handling load errors, making a
Rive button accessible, and cleaning up instances. Use when adding a .riv file
to a web page or React component, wiring hover, press or click states, passing
app data into a Rive graphic, or fixing a Rive canvas that is blank, blurry,
stretched or not responding.
license: Apache-2.0
compatibility: "Web (JavaScript or TypeScript) and React. The editor concepts (artboards, state machines, view models, fit and alignment) carry over to the Flutter, iOS, Android and React Native runtimes, but their APIs differ, so check that runtime's own docs."
metadata:
author: terminal-skills
version: "1.2.0"
category: design
tags: "rive, animation, state-machine, data-binding, interactive, motion"
---
<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by TerminalSkills. See CHANGES.md. -->
# Rive
## Overview
Rive is an interactive animation runtime. Artboards, state machines and view models are designed in the Rive editor and exported as `.riv` files, then played and driven at runtime. The web runtime ships one npm package per renderer, each with a React wrapper:
| Package | React wrapper | Pick it when |
|---|---|---|
| `@rive-app/canvas` | `@rive-app/react-canvas` | Default choice. Uses the browser's Canvas 2D renderer, has the smallest download, and suits pages with many Rive graphics at once (no WebGL context limit). |
| `@rive-app/webgl2` | `@rive-app/react-webgl2` | The file relies on effects that need the Rive Renderer, or you want GPU rendering. The React wrapper shares one WebGL context across all its canvases by default. |
Both expose the same `Rive` class, hooks and enums; switching is a package and import change. The React packages re-export everything from the base package, so in React import `Layout`, `Fit`, `Alignment`, `EventType` and `RuntimeLoader` from the React package and do not install the base package separately: each wrapper pins its own exact copy (`@rive-app/react-canvas` 4.41.0 depends on `@rive-app/canvas` 2.54.0), so a separately installed base package at a different version becomes a second copy of the runtime.
The API notes below were checked against the type definitions of `@rive-app/canvas` 2.56.0 and `@rive-app/react-canvas` 4.41.0 on 2 December 2026. To check a name in the version you have installed, open `node_modules/@rive-app/canvas/rive.d.ts` (React: `node_modules/@rive-app/react-canvas/dist/types/index.d.ts`); deprecated APIs carry `@deprecated` with the replacement, and `@experimental` marks APIs that may change without a major version.
## Before writing code: get the names
Everything is addressed by name, and a wrong name fails quietly (a `null` input or property, or nothing happening). Get these from the designer or the file:
...From TerminalSkills's repository, Apache-2.0 licence.
Related skills
-
Checked
Scroll controlled animations
Builds Apple style scroll animations that play forward and back exactly, so your hero section stays smooth.
8/101 credit -
Checked
Premium web motion design
Plans and builds web animations from one motion style and three easing curves, so your site feels polished.
8/101 credit -
Checked
Unity Character Animation
Wires up Unity Animator states, blend trees, layers and IK, and fixes laggy transitions and sliding feet.
7/101 credit -
Checked
Three.js model loading
Loads glTF and GLB models into three.js with working decoders, so models appear and their animations play.
8/101 credit -
Checked
Remotion video renderer
Builds and renders finished MP4 videos in Remotion with word by word captions, transitions and overlays.
7/101 credit -
Checked
Enter and exit animations
Decides what should animate and builds enters, exits, icon swaps and drag with exact timing and easing values.
7/101 credit