Skip to content

Conversation

@mfazekas
Copy link
Collaborator

@mfazekas mfazekas commented Dec 22, 2025

Summary

  • Add support for swapping artboards at runtime via data binding properties
  • Enables composing complex scenes from artboards in different Rive files

New APIs

  • RiveFile.getBindableArtboard(name) - create bindable artboard reference
  • RiveFile.artboardNames / artboardCount - enumerate artboards
  • ViewModelInstance.artboardProperty(path) - get artboard property
  • ViewModelArtboardProperty.set(artboard) - swap artboard at runtime

Example

const { riveFile: mainFile } = useRiveFile(require('./scene.riv'));
const { riveFile: assetsFile } = useRiveFile(require('./characters.riv'));

const instance = mainFile?.defaultArtboardViewModel()?.createDefaultInstance();
const artboardProp = instance?.artboardProperty('CharacterArtboard');

// Swap to a different character
const character = assetsFile?.getBindableArtboard('Character 1');
artboardProp?.set(character);
rive.mov

References

@mfazekas mfazekas force-pushed the feat/data-binding-artboards branch from f5604dc to 6d905b7 Compare January 5, 2026 14:10
@mfazekas mfazekas marked this pull request as ready for review January 5, 2026 14:24
import { type Metadata } from '../helpers/metadata';

/**
* Data Binding Artboards Example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good explanation. We should also update the other examples to link to the marketplace!

Copy link
Contributor

@HayesGordon HayesGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! But let's remove the ability to add a listener for the time being until Android supports it.

Add support for swapping artboards at runtime via data binding properties.
This enables composing complex scenes from artboards in different Rive files.

New APIs:
- RiveFile.getBindableArtboard(name) - create bindable artboard reference
- RiveFile.artboardNames / artboardCount - enumerate artboards
- ViewModelInstance.artboardProperty(path) - get artboard property
- ViewModelArtboardProperty.set(artboard) - swap artboard at runtime
Copy link
Contributor

@HayesGordon HayesGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! looks great

@mfazekas mfazekas merged commit 515070e into main Jan 6, 2026
7 checks passed
@mfazekas mfazekas deleted the feat/data-binding-artboards branch January 6, 2026 14:58
HayesGordon pushed a commit to rive-app/rive-docs that referenced this pull request Jan 6, 2026
## Summary
- Add React Native code example for artboard data binding in the new
runtime
- Add React Native link to the data binding artboards demo card

Related: rive-app/rive-nitro-react-native#95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants