stevysmith/rive-skills · Archived

rive-web

Trigger when: (1) Loading or embedding .riv files on the web, (2) Using @rive-app/canvas or @rive-app/webgl packages, (3) Controlling Rive state machines from JavaScript, (4) Reading/writing Rive inputs or handling events, (5) User mentions "Rive runtime" or "Rive animation" in web context. Best practices for embedding and controlling Rive animations on the web using the official Rive JavaScript/TypeScript runtime.

First seen Jan 26, 2026

Installation

$ npx skills add stevysmith/rive-skills --skill rive-web

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from stevysmith/rive-skills.

npx skills add stevysmith/rive-skills

Browse all from stevysmith/rive-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 13
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
tags
rive, web, javascript, typescript, animation, runtime

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,550 B
  • docs SUMMARY.md 434 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 4 installs

SKILL.md

Rive Web Runtime

Embed and control Rive animations on the web with JavaScript/TypeScript.

Installation

# Canvas renderer (smaller, good for most cases)
npm install @rive-app/canvas

# WebGL renderer (better for complex animations)
npm install @rive-app/webgl

Quick Start

import { Rive } from '@rive-app/canvas';

const rive = new Rive({
  src: 'animation.riv',
  canvas: document.getElementById('canvas') as HTMLCanvasElement,
  autoplay: true,
  onLoad: () => {
    console.log('Animation loaded');
  },
});

Key Concepts

Concept Description
Rive Instance Main controller for the animation
State Machine Interactive logic built in Rive editor
Inputs Variables to control state machine (Boolean, Number, Trigger)
Events Signals fired by the state machine
Artboard Container for animation content

Common Patterns

Loading Animation

const rive = new Rive({
  src: 'animation.riv',           // URL or path
  canvas: canvasElement,
  stateMachines: 'State Machine', // Name from Rive editor
  autoplay: true,
  onLoad: () => {
    // Animation ready
  },
  onStateChange: (event) => {
    // State changed
  },
});

Controlling Inputs

// Get inputs
const inputs = rive.stateMachineInputs('State Machine');

// Set boolean
const toggle = inputs.find(i => i.name === 'isActive');
toggle.value = true;

// Set number
const progress = inputs.find(i => i.name === 'progress');
progress.value = 0.75;

// Fire trigger
const click = inputs.find(i => i.name === 'onClick');
click.fire();

Handling Events

rive.on('riveevent', (event) => {
  console.log('Event:', event.data.name);
  // Access custom properties
  const data = event.data.properties;
});

Cleanup

// Always cleanup when done
rive.cleanup();

Rules

@file rules/loading.md @file rules/state-machines.md @file rules/inputs.md