A Blazor component for Rive animations.
Install the package from NuGet:
dotnet add package Rive.Blazor.Wasm
Add the RivePlayer
component to your Blazor component:
<RivePlayer
File="https://cdn.rive.app/animations/vehicles.riv"
Width="400"
Height="400"
Autoplay="true"
Artboard="Vehicles"
StateMachines="vehicles"
/>
The File
parameter is the URL of the Rive file to load.
The Width
and Height
parameters are the dimensions of the canvas.
The Autoplay
parameter is a boolean that indicates whether the animation should start automatically.
The Artboard
parameter is the name of the artboard to use.
The StateMachines
parameter is the name of the state machine to use.
Other features are currently not supported. Passing additional parameters to the component will be forwarded to the canvas element.
This project is licensed under the MIT License - see the LICENSE file for details.