This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Host
A Jetpack Compose Host component for bridging React Native and Jetpack Compose.
For cross-platform usage, see the universal
Host— it renders the appropriate native component per platform.
The Host component is the bridge between React Native and Jetpack Compose. Every Jetpack Compose component from @expo/ui/jetpack-compose must be wrapped in a Host to render correctly.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Match contents
Use the matchContents prop to make the Host size itself to fit the content. You can pass a boolean or an object to control vertical and horizontal sizing independently.
Note: Do not use
matchContentson the same axis as a scrollable child (LazyRow,LazyColumn,Carousel, or anything usingModifier.horizontalScroll/verticalScroll). Scrollables require a finite max constraint on their scroll axis andmatchContentspropagates an unbounded one.
The following example crashes:
Either drop matchContents on the scroll axis or give the Host a finite size on that axis via style:
With style
Apply standard React Native styles to the Host wrapper.
API
import { Host } from '@expo/ui/jetpack-compose';
No API data file found, sorry!