rive-app / rive-app/rive-react-native

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

Open
#375 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
783
Forks
81
Avg merge
3d 6h
Merged PRs (30d)
3

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rive-react-native view's Fit.Layout path and the artboard bounds/data-binding behavior described here; check whether React Native can receive intrinsic size updates. Done means establishing whether explicit height is required and documenting a supported runtime pattern for text-driven height changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.