.riv file can contain multiple artboards, allowing you to organize related animations in a single file.
Overview
TheRiveArtboard class represents an instance of an artboard from a Rive file. It provides access to animations, state machines, and allows you to advance time and render content.
Getting an Artboard
From RiveFile
From RiveModel
Artboard Properties
Dimensions
Name
Audio Volume
Working with Animations
Accessing Animations
Example: Multiple Artboards
Working with State Machines
Accessing State Machines
Accessing State Machine Inputs
Text Runs
Access and modify text content in your artboard:Advancing and Drawing
Manual Advancement
Rendering
Data Binding
Bind view model instances to artboards:Best Practices
Multiple instances from one file
Multiple instances from one file
You can create multiple artboard instances from a single
RiveFile. Each instance maintains its own animation state.Check for existence before accessing
Check for existence before accessing
Always verify that animations or state machines exist before trying to access them by name or index.
Use RiveViewModel for simpler integration
Use RiveViewModel for simpler integration
For most use cases,
RiveViewModel provides a higher-level interface that handles artboard management automatically.Related
- RiveFile - Load .riv files and access artboards
- Linear Animations - Work with linear animations
- State Machines - Interactive animation logic