You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the @expo/uiBottomSheet component (from @expo/ui/src/swift-ui/BottomSheet), the component itself should not consume space or render any visible frame. Only its children should render inside the SwiftUI-backed sheet.
Currently, it seems the BottomSheet component might be influencing layout or not behaving as expected — it's unclear if it's fully invisible or if it's affecting the parent view’s layout.
🔍 Code Example
import{BottomSheet}from"@expo/ui/src/swift-ui/BottomSheet";import{useState}from"react";import{Text,TouchableOpacity,View}from"react-native";exportdefaultfunctionHomeScreen(){const[isOpen,setIsOpen]=useState(false);const[height,setHeight]=useState(0);return(<Viewstyle={{flex: 1,alignItems: "center",justifyContent: "center",}}><ViewonLayout={(event)=>{const{ height }=event.nativeEvent.layout;setHeight(Math.floor(height));}}style={{backgroundColor: "pink",position: "relative",}}><Textstyle={{position: "absolute",top: 0,left: 0}}>
The `BottomSheet` component takes {height}px when declared. It should
be invisible and not occupy any layout space. Only its children should be visible,
rendered inside the native SwiftUI sheet.
</Text><TouchableOpacitystyle={{position: "absolute",top: "50%",left: "50%",zIndex: 1,}}onPress={()=>setIsOpen(true)}><Text>Open Bottom Sheet</Text></TouchableOpacity><BottomSheetisOpened={isOpen}onIsOpenedChange={(isOpened: boolean)=>setIsOpen(isOpened)}><Viewstyle={{height: height||300,alignItems: "center",justifyContent: "center",backgroundColor: "white",}}><Text>Hello, world!</Text></View></BottomSheet></View></View>);}
### Environment```textexpo-env-info1.3.3environmentinfo:
System:
OS: macOS15.4.1
Shell: 4.0.2-/opt/homebrew/bin/fish
Binaries:
Node: 22.13.1-~/.volta/tools/image/node/22.13.1/bin/node
npm: 10.9.2-~/.volta/tools/image/node/22.13.1/bin/npm
Managers:
CocoaPods: 1.16.2-/opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit24.4,iOS18.4,macOS15.4,tvOS18.4,visionOS2.4,watchOS11.4
IDEs:
Android Studio: 2024.3AI-243.24978.46.2431.13208083
Xcode: 16.3/16E140-/usr/bin/xcodebuild
npmPackages:
expo: ~53.0.9=>53.0.9expo-router: ~5.0.6=>5.0.7react: 19.0.0=>19.0.0react-dom: 19.0.0=>19.0.0react-native: 0.79.2=>0.79.2react-native-web: ~0.20.0=>0.20.0Expo Workflow: managed
Minimal reproducible example
https://github.com/MateuszLeo/expo-sheet-example
Steps to reproduce
🐛
BottomSheetScreen.Recording.2025-05-22.at.22.55.30.mov
Summary
When using the
@expo/uiBottomSheetcomponent (from@expo/ui/src/swift-ui/BottomSheet), the component itself should not consume space or render any visible frame. Only its children should render inside the SwiftUI-backed sheet.Currently, it seems the
BottomSheetcomponent might be influencing layout or not behaving as expected — it's unclear if it's fully invisible or if it's affecting the parent view’s layout.🔍 Code Example
Expo Doctor Diagnostics