Skip to content

Can height auto-size from artboard (responsive text) without hardcoding? #375

@rhinck

Description

@rhinck

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:

  1. Does rive-react-native provide an intrinsic size (e.g., artboard bounds) that RN can use so height can be measured automatically?

  2. 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.)?

  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions