Build native mobile UI with React and Expo
Expo UI renders native SwiftUI and Jetpack Compose from React in Expo apps, with universal cross-platform components and drop-in replacements for RN UI
Why it matters
Render true native UI components (SwiftUI on iOS, Jetpack Compose on Android) directly from React code in Expo or React Native apps, enabling developers to write cross-platform mobile interfaces with a single codebase while maintaining native performance and platform fidelity.
Outcomes
What it gets done
Write universal components that render natively on iOS, Android, and web from one React tree
Drop to platform-specific SwiftUI or Jetpack Compose when universal components don't cover edge cases
Migrate existing React Native apps by swapping community UI libraries with drop-in replacements
Wrap component trees in Host and install @expo/ui to start building native interfaces immediately
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-expo-ui | bash Overview
Expo UI (`@expo/ui`)
`@expo/ui` renders real native UI from React: SwiftUI on iOS, Jetpack Compose on Android, and react-native-web/react-dom on web. It provides universal components (Host, Column, Row, Button, Text, List) that run unmodified across all three platforms from a single source tree, plus platform-specific SwiftUI and Jetpack Compose layers for cases where the universal layer falls short. It also ships API-compatible drop-in replacements for popular React Native community UI libraries. Use this skill when building native UI in an Expo or React Native app with the `@expo/ui` package. Start with universal components imported from the `@expo/ui` root for cross-platform consistency. Drop to platform-specific imports (`@expo/ui/swift-ui` or `@expo/ui/jetpack-compose`) only when the universal layer is missing a component, modifier, or platform-specific behavior you need. Use drop-in replacements when migrating off existing RN community UI libraries. Do not import `@expo/ui/swift-ui` on Android or `@expo/ui/jetpack-compose` on iOS - these will crash at runtime. Isolate platform-spe
What it does
@expo/ui renders real native UI from React: SwiftUI on iOS, Jetpack Compose on Android, and react-native-web/react-dom on web. It provides universal components (Host, Column, Row, Button, Text, List) that run unmodified across all three platforms from a single source tree, plus platform-specific SwiftUI and Jetpack Compose layers for cases where the universal layer falls short. It also ships API-compatible drop-in replacements for popular React Native community UI libraries like @gorhom/bottom-sheet and @react-native-community/datetimepicker.
When to use - and when NOT to
Use this skill when building native UI in an Expo or React Native app with the @expo/ui package. Start with universal components imported from the @expo/ui root for cross-platform consistency. Drop to platform-specific imports (@expo/ui/swift-ui or @expo/ui/jetpack-compose) only when the universal layer is missing a component, modifier, or platform-specific behavior you need. Use drop-in replacements when migrating off existing RN community UI libraries.
When NOT to use: Do not import @expo/ui/swift-ui on Android or @expo/ui/jetpack-compose on iOS - these will crash at runtime with "Unable to get view config" errors. Isolate platform-specific trees in .ios.tsx / .android.tsx files in components/ (never inside app/ - Expo Router does not support platform extensions for route files), or guard with Platform.OS. Do not use this skill for tasks outside its upstream product or API scope.
Inputs and outputs
You provide React component trees using @expo/ui imports. Every tree must be wrapped in Host. For universal components, import from @expo/ui root. For platform-specific UI, import from @expo/ui/swift-ui (iOS-only) or @expo/ui/jetpack-compose (Android-only). For drop-in replacements, import from @expo/ui/community/<name>.
You receive real native UI: SwiftUI views on iOS, Jetpack Compose components on Android, and web-compatible output via react-native-web/react-dom. The universal layer requires SDK 56+. Drop-in replacements and platform-specific layers also exist on SDK 55.
Installation
Install the package:
npx expo install @expo/ui
On SDK 56, @expo/ui works in Expo Go, so npx expo start runs it directly with no custom build required. On older SDKs, build a dev client first with npx expo run:ios or npx expo run:android.
Integrations
The skill covers these reference areas:
references/
universal.md Universal @expo/ui components and when to use them (SDK 56+)
drop-in-replacements.md API-compatible replacements for RN community UI libraries
swift-ui.md Platform-specific iOS UI: @expo/ui/swift-ui components, modifiers, RNHostView, useNativeState
jetpack-compose.md Platform-specific Android UI: @expo/ui/jetpack-compose components, modifiers, LazyColumn caveat, icons, useNativeState
Drop-in replacements include API-compatible swaps for @gorhom/bottom-sheet, @react-native-community/datetimepicker, and other popular RN community UI libraries.
Who it's for
This skill is for developers building Expo or React Native apps who need native UI rendering. It suits teams prioritizing cross-platform consistency (universal layer) and those needing platform-specific optimizations (SwiftUI/Jetpack Compose layers). It also helps teams migrating from RN community UI libraries via drop-in replacements. The universal approach reduces maintenance by eliminating platform file splits; the platform-specific approach trades that simplicity for access to the full native UI toolkit when required.
Source README
Expo UI (@expo/ui)
When to Use
Use this skill when you need build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android rendered from React in an Expo or React Native app. Covers universal cross-platform components (Host, Column, Row, Button, Text, List, and more imported from @expo/ui), drop-in replacements...
@expo/ui renders real native UI from React: SwiftUI on iOS, Jetpack Compose on Android. Start with its universal components (one tree for iOS, Android, and web) and drop to platform-specific SwiftUI/Jetpack Compose only when the universal layer falls short. It also ships drop-in replacements for migrating off RN community UI libraries.
These instructions track the latest Expo SDK. The universal layer requires SDK 56+. Drop-in replacements and the platform-specific layers also exist on SDK 55. For component details on a specific SDK, refer to the Expo UI docs for that version.
Installation
npx expo install @expo/ui
On SDK 56, @expo/ui works in Expo Go, so npx expo start runs it directly - no custom build required. On older SDKs, build a dev client first (npx expo run:ios / npx expo run:android).
Every @expo/ui tree - universal or platform-specific - must be wrapped in Host.
Choosing an approach (read this first)
Work down this list and stop at the first layer that meets the need:
Universal components - start here. Import from the
@expo/uiroot. One component tree runs unmodified on iOS, Android, and web from a single source (Compose on Android, SwiftUI on iOS,react-native-web/react-domon web). No platform file splits. →./references/universal.mdPlatform-specific (SwiftUI / Jetpack Compose). Import from
@expo/ui/swift-uior@expo/ui/jetpack-compose. Use only when the universal layer is missing a component or modifier you need, or when you need platform-specific behavior or optimization. Downside: you write two trees and split them into.ios.tsx/.android.tsxfiles (or branch onPlatform.OS) - more code to maintain.@expo/ui/swift-uiis iOS-only.@expo/ui/jetpack-composeis Android-only. Importing either in a file that runs on the other platform will crash at runtime with "Unable to get view config" errors. Isolate platform-specific trees in.ios.tsx/.android.tsxfiles placed incomponents/(never insideapp/- Expo Router does not support platform extensions for route files), or guard withPlatform.OSin a regular route file.Hostmust always be imported from@expo/ui(the universal package root), not from the platform-specific sub-packages. →./references/swift-ui.mdand./references/jetpack-compose.md
Already using an RN community UI library? @expo/ui also ships drop-in replacements - API-compatible swaps for popular libraries (@gorhom/bottom-sheet, @react-native-community/datetimepicker, and more), imported from @expo/ui/community/<name>. This is a migration side-path for replacing an existing dependency, not a step in the universal-vs-platform decision above. → ./references/drop-in-replacements.md
References
Consult these resources as needed:
references/
universal.md Universal @expo/ui components and when to use them (SDK 56+)
drop-in-replacements.md API-compatible replacements for RN community UI libraries
swift-ui.md Platform-specific iOS UI: @expo/ui/swift-ui components, modifiers, RNHostView, useNativeState
jetpack-compose.md Platform-specific Android UI: @expo/ui/jetpack-compose components, modifiers, LazyColumn caveat, icons, useNativeState
Limitations
- Use this skill only when the task clearly matches its upstream product or API scope.
- Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
- Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.