frontend-rive

Orchestrate Rive state machine animations in React with useStateMachineInput.

13|2|Updated Aug 9, 2025
One-click install
npx skills add https://github.com/petbrains/mvp-builder --skill frontend-rive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-rive
Source: https://github.com/petbrains/mvp-builder/tree/main/.claude/skills/frontend-rive
Command: npx skills add https://github.com/petbrains/mvp-builder --skill frontend-rive

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables building interactive, state-driven animations in UI using Rive state machines.

Core Features & Use Cases

  • State machines tied to inputs (hover, click, data)
  • Multi-state components (buttons, toggles, progress)
  • SSR-safe patterns and React integration

Quick Start

Use useRive with the project's .riv file and connect to UI events.

Frequently Asked Questions about frontend-rive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create interactive animations that respond to user input in React?

Interactive animations that respond to user input are built using state machines that listen to events like clicks and hovers. Rive state machines in React handle this by exposing named inputs you wire to UI events, letting animations update reactively without managing complex animation logic yourself.

Can I use Rive animations with React components?

Yes, Rive integrates with React through the @rive-app/react-canvas library. You load a .riv file containing a state machine, use the useRive hook to access it, and connect UI events to state machine inputs using useStateMachineInput to trigger animation transitions.

What's the best way to build animated buttons and toggles?

Animated buttons and toggles are built by defining state machines in Rive with states for each visual state (idle, hover, pressed), then connecting those states to inputs tied to React event handlers. The state machine automatically transitions between animations based on user interaction.

How do I make animations data-driven in React?

Data-driven animations use state machine inputs to respond to data values, not just user events. Wire your data to state machine inputs via useStateMachineInput—for example, passing progress values to a progress indicator animates it based on your app's state.

Do Rive animations work with server-side rendering?

Rive provides SSR-safe patterns for React that prevent hydration mismatches. Load the .riv file and initialize the state machine on the client side to ensure animations render consistently across server and browser contexts.