npx skills add ...
npx skills add freshtechbro/claudedesignskills --skill rive-interactive
State machine-based vector animation with runtime interactivity and web integration. Use this skill when creating interactive animations, state-driven UI, animated components with logic, or designer-created animations with runtime control. Triggers on tasks involving Rive, state machines, interactive vector animations, animation with input handling, ViewModel data binding, or React Rive integration. Alternative to Lottie for animations requiring state machines and two-way interactivity.
npx skills add freshtechbro/claudedesignskills --skill rive-interactive
Rive is a state machine-based animation platform that enables designers to create interactive vector animations with complex logic and runtime interactivity. Unlike timeline-only animation tools (like Lottie), Rive supports state machines, input handling, and two-way data binding between application code and animations.
Key Features:
When to Use This Skill:
Alternatives:
State machines define animation behavior with states and transitions:
Three input types control state machine behavior:
Data binding system for dynamic properties:
Custom events emitted from animations:
Use Case: Display a simple Rive animation in React
Implementation:
Key Points:
src: Path to .riv fileartboard: Which artboard to displayanimations: Which animation timeline to playlayout: How animation fits in containerUse Case: Control animation states based on user interaction
Implementation:
Input Types:
input.value = true/falseinput.value = 50input.fire()Use Case: Bind application data to animation properties
Implementation:
ViewModel Property Hooks:
useViewModelInstanceString - Text propertiesuseViewModelInstanceNumber - Numeric propertiesuseViewModelInstanceColor - Color properties (hex)useViewModelInstanceEnum - Enum selectionuseViewModelInstanceTrigger - Animation triggersUse Case: React to events emitted from Rive animation
Implementation:
Use Case: Optimize load times by preloading animations
Implementation:
Use Case: Control animation from parent component
Implementation:
Use Case: Update multiple animation properties from complex data
Implementation:
Animate container while Rive handles interactive content:
Trigger Rive animations on scroll:
In Rive Editor:
Problem: useStateMachineInput returns null
Solution:
Problem: ViewModel property doesn't update animation
Solution:
Problem: Rive events not triggering callback
Solution:
This skill includes utility scripts:
component_generator.py - Generate Rive React component boilerplateviewmodel_builder.py - Build ViewModel property bindingsRun scripts from the skill directory:
Starter templates and examples:
starter_rive/ - Complete React + Rive templateexamples/ - Real-world integration patterns