- New Runtime (Recommended)
- Legacy Runtime
The following are props you can set on the
RiveView component:How the Rive graphic should be aligned within its container.
Ignored when using
Fit.Layout.The scale factor to apply to the Rive graphic when using
Fit.Layout. The default value of -1 uses the device’s DPI.
This property has no effect for any other
Fit type.Caps how often the view renders. A number caps rendering at that many frames per second. A
FrameRateRange ({ minimum, maximum, preferred? }) maps to CAFrameRateRange on iOS; Android caps at preferred, or maximum if preferred isn’t set.If not set, the view renders at the display’s refresh rate.See Frame rate.
Requires
0.5.0 or later.Exposes accessibility semantics authored in the editor to the screen reader. See Semantics.
Requires
0.5.0 or later. iOS only; ignored on Android.The name of the artboard to display.If not set, the default artboard will be used, as configured in the Editor.
The name of the state machine to play.If not set, the default state machine will be used, as configured in the Editor.
The view model instance to bind to the state machine. Can be:
- A
ViewModelInstanceobject (fromuseViewModelInstance) DataBindMode.Auto(default) - automatically binds the default view model instanceDataBindMode.None- no data binding{ byName: string }ornew DataBindByName(name)- bind an instance of the artboard’s default view model by name
Called when the view fails to configure or render, for example because of an invalid artboard or state machine name.If not set, errors are logged with
console.error.See Error Handling.RiveView also accepts standard React Native view props such as style.