- New Runtime (Recommended)
- Legacy Runtime
Once you have access to the Rive ref object (via
useRive hook), there are a number of methods available to invoke for controlling your Rive graphic.Starts playing the Rive graphic.
Pauses the Rive graphic.
Resets the Rive graphic to its initial state.
Low overhead function to ensure the Rive graphic is playing. Use after property value updates to ensure the graphic is updated.
Waits for the Rive view to be ready. Returns a promise that resolves when the Rive view is ready.
Binds a view model instance to the Rive view. See the Data Binding documentation for more details.
Gets the currently bound view model instance from the Rive view. Returns the bound
ViewModelInstance, or undefined if none is bound.Sets the text run value on the Rive view.
Gets the text run value from the Rive view.
Sets a number state machine input on the Rive view.
Gets a number state machine input from the Rive view.
Sets a boolean state machine input on the Rive view.
Gets a boolean state machine input from the Rive view.
Triggers a trigger state machine input on the Rive view.
Adds an event listener to the Rive view.
Removes all event listeners from the Rive view.