For more information on creating Artboards in Rive, please refer to: Artboards.

Choosing an artboard

When a Rive object is instantiated, the artboard to use can be specified. 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 used at a time.

new rive.Rive({
    src: 'https://cdn.rive.app/animations/vehicles.riv',
    canvas: document.getElementById('canvas'),
    artboard: 'Truck',
    autoplay: true
});