-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Description
Goal:
In an Expo React Native app using rive-react-native, I want the animation to fill the available width and have its height determined by the Rive artboard’s responsive layout. The artboard grows based on a bound text value (via data binding).
####Problem:
With fit={Fit.Layout}, if I don’t set an explicit height on the Rive view/container, nothing renders. Adding a fixed height works, but I need the height to adapt to the artboard’s content (which changes with text).
Questions:
-
Does rive-react-native provide an intrinsic size (e.g., artboard bounds) that RN can use so height can be measured automatically?
-
With Fit.Layout, is an explicit height always required in RN? If yes, what’s the recommended pattern to derive height from the artboard at runtime (e.g., read bounds on load and set container height, compute aspectRatio, etc.)?
-
Any best practices for dynamic, text-driven Rive layouts on RN so the view height reflects artboard changes after data binding?
What I tried
style={{ width: '100%' }} alone → nothing renders. Adding a fixed height makes it render, but it defeats the goal of dynamic sizing from the artboard’s responsive layout.