Skip to content

Host matchContents incorrectly positions SwiftUI content for elements at or off the viewport edge #42576

@jsteiner

Description

@jsteiner

Minimal reproducible example

https://github.com/jsteiner/expo-ui-host-bug

Steps to reproduce

Occurs in Hosts with matchContents that are initialized at or off the viewport edge. Note the spacing in the initial card layouts below, then observe how that differs in the card at the very bottom and off screen.

CleanShot.2026-01-26.at.17.58.05-converted.mp4

Environment

❯ npx expo-env-info

  expo-env-info 2.0.8 environment info:
    System:
      OS: macOS 15.7.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 25.2.1 - ~/.local/share/mise/installs/node/25.2.1/bin/node
      npm: 11.6.2 - ~/.local/share/mise/installs/node/25.2.1/bin/npm
      Watchman: 2025.12.29.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.16.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 25.2, iOS 26.2, macOS 26.2, tvOS 26.2, visionOS 26.2, watchOS 26.2
    IDEs:
      Xcode: 26.2/17C52 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~55.0.0-preview.6 => 55.0.0-preview.6
      expo-router: ~55.0.0-beta.3 => 55.0.0-beta.3
      react: 19.2.0 => 19.2.0
      react-dom: 19.2.0 => 19.2.0
      react-native: 0.83.1 => 0.83.1
    Expo Workflow: bare

Expo Doctor Diagnostics

❯ npx expo-doctor@latest
17/17 checks passed. No issues detected!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions