- 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.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. Resolves to
true once the view is configured, or false if configuration failed. The riveViewRef returned by useRive is only set after this resolves.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.To wait for the auto-bound instance in a component, prefer useViewModelInstance(riveViewRef, { async: true }).Sets a number state machine input on the Rive view.
Sets a boolean state machine input on the Rive view.