How do I access artboard and view model instance with useRive?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start by reviewing the Rive instance initialized through @rive-app/react-canvas and determine how the loaded file and its artboard are exposed. Compare the available API with the documented ViewModelInstance access, and consider the work complete when the requested artboard and view-model properties can be accessed for runtime updates.
Written by the indexing model from the issue text.
Description
My rive file got update, if before I used to use rive.setNumberStateAtPath to change my block lines count, now I need to access view model instance to directly change text in that box, for example change its font size.
From rive docs, I received these instructions on how to do it:
Access the View Model Instance:
Within your application, retrieve the Artboard from the loaded Rive file. Then, access the ViewModelInstance associated with that Artboard. This instance contains the properties you’ve defined and bound in the Rive editor.
Modify Properties at Runtime:
Once you have access to the View ModelInstance, you can get or set its properties to reflect changes in your application. For example, if you have a property controlling font size, you can update it based on user input or other runtime conditions.
BUT, the problem is, there is no properties on my rive to get artboard
Here is how I initialize the rive:
Importing everything from @rive-app/react-canvas
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 58
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rive-app/rive-react
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
rive-app/rive-react#410 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 42/100
rive-app/rive-react#409 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
rive-app/rive-react#400 ·
-
triage
Difficulty 3/5 1-2 days Newbie friendliness 45/100
rive-app/rive-react#392 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 55/100
rive-app/rive-react#386 · 1 reaction ·
All issues in rive-app/rive-react
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
siyuan-note/siyuan#20040 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RunestoneInteractive/rs#1574 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
remotion-dev/remotion#11901 ·
Maintainers usually reply within 1 day
-
Poll constructor throws for an uncached channel while resolving a message context-menu interactionOpenbug need repro packages:discord.js
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
discordjs/discord.js#11645 ·
Maintainers usually reply within 3 days
-
🐞 bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Sitecore/content-sdk#641 ·
Maintainers usually reply within 2 days