Skip to main content
For more information on creating artboards in the Rive editor, please refer to Artboards.

Choosing an Artboard

When a Rive object is instantiated or when a Rive file is rendered, you can specify the artboard to use. If no artboard is given, the default artboard, as set in the Rive editor, is used. If no default artboard is set, the first artboard is used. Only one artboard can be rendered at a time.
The following section assumes that you have read through the Apple overview.

Getting an Artboard

Once you have created a File, you can then retrieve information for and create Artboard types.
Note that these are all async throwing functions marked as @MainActor. Since they are functions called on a File object, any thrown errors will be of type FileError.An example of when one of these functions will throw is if you call .createArtboard(_:) with a name that is not in the origin File, which will throw a FileError.invalidArtboard(String).

Using an Artboard

Remember that the Rive configuration for a view is the Rive type. In the overview, we show initializing a Rive object with a file, opting to use the default artboard and state machine. However, you can initialize a Rive object with a specific artboard:
Artboards then become the source of truth for state machines. See State Machine for more details.