npx skills add smithery/neversight --skill rive-react
stevysmith/rive-skills · Archived
rive-react
Trigger when: (1) Using @rive-app/react-canvas or @rive-app/react-webgl, (2) Using useRive hook or RiveComponent, (3) Building React components with Rive animations, (4) User mentions "Rive React" or "useRive", (5) Implementing scroll-based or parallax animations with Rive. Best practices for integrating Rive animations in React applications using the official Rive React package. Covers hooks, layout, and scroll animations.
Installation
npx skills add stevysmith/rive-skills --skill rive-react
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Trigger when: (1) Working with Rive scripts or Luau code, (2) Code contains Node, Layout, Conve…
11 installsTrigger when: (1) User wants to create a Rive animation programmatically, (2) User mentions "ge…
5 installsTrigger when: (1) Loading or embedding .riv files on the web, (2) Using @rive-app/canvas or @ri…
4 installsRequired reference for Prisma ORM 7 SQL driver adapter work.
258.3K installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge F…
263K installsAlso in this package
Other skills from stevysmith/rive-skills.
npx skills add 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.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
More metadata
- tags
- rive, react, hooks, animation, components
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md2,485 B -
docs
SUMMARY.md445 B
History
- First seen on skills.sh
- First recorded snapshot · 14 installs
SKILL.md
Rive React
React components and hooks for Rive animations.
Installation
# Canvas renderer (recommended)
npm install @rive-app/react-canvas
# WebGL renderer (complex animations)
npm install @rive-app/react-webgl
Quick Start
import { useRive } from '@rive-app/react-canvas';
function MyAnimation() {
const { RiveComponent } = useRive({
src: 'animation.riv',
stateMachines: 'State Machine 1',
autoplay: true,
});
return <RiveComponent />;
}
useRive Hook
The main hook for Rive integration:
const {
RiveComponent, // The canvas component to render
rive, // Rive instance for direct control
} = useRive({
src: 'animation.riv',
stateMachines: 'State Machine',
autoplay: true,
});
Controlling Inputs
import { useRive, useStateMachineInput } from '@rive-app/react-canvas';
function ControlledAnimation() {
const { rive, RiveComponent } = useRive({
src: 'animation.riv',
stateMachines: 'State Machine',
autoplay: true,
});
// Get typed input
const isActive = useStateMachineInput(rive, 'State Machine', 'isActive');
const progress = useStateMachineInput(rive, 'State Machine', 'progress');
return (
<>
<RiveComponent />
<button onClick={() => isActive && (isActive.value = !isActive.value)}>
Toggle
</button>
<input
type="range"
onChange={(e) => progress && (progress.value = +e.target.value)}
/>
</>
);
}
Callbacks
const { RiveComponent } = useRive({
src: 'animation.riv',
stateMachines: 'State Machine',
autoplay: true,
onLoad: () => console.log('Loaded'),
onStateChange: (event) => console.log('State:', event.data),
onPlay: () => console.log('Playing'),
onPause: () => console.log('Paused'),
});
Rules
@file rules/use-rive.md @file rules/callbacks.md @file rules/layout.md @file rules/scroll-animations.md