@celestia-project/mobileExpo SDK 57iOS · Android

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.

157Modules
52Primitive
58Composite
27AI
20Layout

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.

PathWhat it is
packages/mobileThe library (@celestia-project/mobile)
apps/mobileThe 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.

01Install Expo Go on your phoneThe sandbox client from the App Store or Google Play. @expo/ui ships inside it, so the hosted native views work without a development build.
02Start the Metro dev serverRun the command below from the repository root and leave the terminal open — it prints the QR code and keeps the bundle served.
03Scan the QR codeWith the Expo Go camera (iOS) or straight from the app (Android). The showcase opens on the device — pick a section from its root list.

On your phone

terminal
pnpm mobile

On this machine instead

terminal
pnpm --filter mobile ios     # simulator
pnpm --filter mobile android # emulator

Using the package in your own app

The package

workspace
pnpm --filter mobile add @celestia-project/mobile@workspace:*

Native peers — autolinked by Expo

expo install
npx expo install @expo/ui expo-haptics react-native-safe-area-context

Pin 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.

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.

01No hardcoded coloursEverything reads useMobileTheme(); the light and dark ramps are both complete.
0244×44pt minimum touch targetOn every interactive element, exposed as metrics.minTouchTarget. A control drawn shorter to match the web design system — MobileButton is 32px — meets the floor with hitSlop rather than by inflating the box.
03Haptics fire on the causal commit frameLight for a normal press, Medium for a destructive one, selectionAsync for a toggle. Never on mount.
0416px font floor on text inputsBelow it, iOS zooms the viewport on focus and never zooms back.
05Tabular numerals for countersPrices, timers and counts, so a changing digit does not shift the row.
06Icons arrive as propsThe package takes no icon dependency; only structural marks (a tick, a chevron, a magnifier) are drawn inline.
07No hover-only affordancesThere is no hover on a thumb. Anything hidden behind one does not exist.
08Forms never disable submit for empty fieldsIt stays pressable and names what is missing; it is disabled only while loading.
09Screens are presentationalProps in, callbacks out — no fetching, no auth client, no routing.

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.

CapabilityiOSAndroidNote
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

ImportImplementationPlatforms
@expo/uiUniversal — resolves to the .ios.tsx / .android.tsx implementation for the current platformiOS · Android
@expo/ui/swift-uiSwiftUI onlyiOS
@expo/ui/jetpack-composeJetpack Compose onlyAndroid

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.