Mobile
Native iOS and Android components built on @expo/ui — real SwiftUI and Jetpack Compose views, organised into primitives, composites, AI surfaces and layout screens. This surface shows the shapes; the reference docs carry the install, the peer dependencies and the API.
Get started
What this package is
The native counterpart to @celestia-project/ui — and deliberately not a port of it.
The web components assume a DOM, hover states and a CSS box model. These assume a thumb, a safe area and a touch-target floor. What the two packages share is the taxonomy — the same primitive / composite / ai / layout split — and the design tokens, so a component sits in the same mental bucket whichever library you are in. That shared taxonomy is also the escape hatch: when a screen needs a first-class web implementation, it can be rebuilt on @celestia-project/ui with the same names and the same tokens.
apps/api and drops into any Expo project.publish.sh ships @celestia-project/ui, @celestia-project/create and @celestia-project/mobile. Inside the workspace it resolves from source through the workspace protocol.| Path | What it is |
|---|---|
| packages/mobile | The library (@celestia-project/mobile) |
| apps/mobile | The Expo showcase app that consumes it |
Get started
Run in Expo Go
Everything on this page is an HTML transcription. The running components — the real SwiftUI and Jetpack Compose views included — live in the Expo showcase app, and Expo Go runs it with no native build.
On your phone
pnpm mobileOn this machine instead
pnpm --filter mobile ios # simulator
pnpm --filter mobile android # emulatorUsing the package in your own app
The package
pnpm --filter mobile add @celestia-project/mobile@workspace:*Native peers — autolinked by Expo
npx expo install @expo/ui expo-haptics react-native-safe-area-contextPin React Native to the SDK 57 pairing
Use npx expo install react-native so it resolves 0.86.3. Do not bump to ^0.87 by hand — Expo 57's Metro tooling requires rn-get-polyfills, which React Native 0.87 removed.
@expo/ui is bundled inside the Expo Go client, so the SwiftUI / Compose views run in the sandbox app with no Xcode, no Android SDK and no development build. A dev build (npx expo run:ios) is only needed once you add native code of your own.Get started
Design rules
Enforced by convention and review, not by a linter — which is exactly why they are worth knowing before adding a component.
Get started
Platform support
The library targets iOS and Android. Both get real SwiftUI and Jetpack Compose views through @expo/ui — the universal entry every component in this package imports. There is no web target; browser UI belongs to @celestia-project/ui.
| Capability | iOS | Android | Note |
|---|---|---|---|
| Components built on @expo/ui | ✓ | ✓ | SwiftUI on iOS, Jetpack Compose on Android, through the universal entry |
| Rest of the package (plain React Native) | ✓ | ✓ | No @expo/ui at runtime |
| apps/mobile showcase | ✓ | ✓ | Runs in Expo Go — no development build needed |
One universal entry, resolved per platform
| Import | Implementation | Platforms |
|---|---|---|
| @expo/ui | Universal — resolves to the .ios.tsx / .android.tsx implementation for the current platform | iOS · Android |
| @expo/ui/swift-ui | SwiftUI only | iOS |
| @expo/ui/jetpack-compose | Jetpack Compose only | Android |
Every module in packages/mobile imports from "@expo/ui" — the universal entry — never from /swift-ui or /jetpack-compose, so the same code gets the right native views on both platforms. Everything else in the package is plain React Native and needs no @expo/ui at runtime.
MobileSlider's gesture geometry in particular, since a PanResponder cannot be validated by a typecheck; and the showcase icons, where optical size and stroke weight inside a 44pt control are not things a typecheck can see.