Expo

@ng-native/expo puts Expo's native modules behind ordinary Angular services: signals instead of hooks, injection instead of a use*() call at the top of a component. Reach for it whenever an app wants something Expo already wraps well - battery and brightness, haptics and the clipboard, notifications, on-device storage, sensors, a video or audio player, the file system, a small SQLite database, fonts, the splash screen, OTA updates, photos, location, biometrics, sign-in, the on-device language model, real SwiftUI and Jetpack Compose controls - rather than writing another native module wrapper by hand. It is entirely optional: nothing in the rest of the framework depends on it, and an app that is not built on Expo skips the package outright.

The smallest thing that works

Every module this package wraps is an optional peer dependency, so installing the package pulls in no native code on its own - you install the specific module because your app wants that capability, then inject the service:

import { Component, inject } from '@angular/core';
import { Text } from '@ng-native/components';
import { Battery } from '@ng-native/expo/battery';

@Component({
  selector: 'app-status',
  imports: [Text],
  template: `
    @if (battery.low()) {
      <text>Battery saver recommended</text>
    }
  `,
})
export class Status {
  protected readonly battery = inject(Battery);
}

Services are constructed when injected. Install the Expo dependencies required by the entry points you import: runtime fallbacks do not prevent Metro from reporting an unresolved package. Using a module covers exactly how that works, and how the package is organised into one entry point per module.

Modules

Basics

  • Using a module - installing a module, entry points, and what happens without one.
  • Permissions - any Expo module's get/request permission pair, as signals.

Device state

  • Battery - charge level and low-power mode, as signals.
  • Brightness - read and set the screen's brightness.
  • Network - whether the device is connected, and reachable.
  • Orientation - the screen orientation, and locking it.
  • Locale - the user's preferred locales, in order, and text direction.
  • Sensors - the accelerometer, gyroscope, magnetometer and more, one shape for all.
  • Keep awake - hold the screen on, with the release handed back.
  • App info - the app's own version and build, and the device it is on.

Feedback

  • Haptics - a tap the user feels, without a promise to await.
  • Clipboard - write to the pasteboard, and count when it changes.
  • Notifications - the tap that opened or resumed the app.

Storage and files

  • Storage - a persisted value as a two-way signal.
  • File system - read and write files in the app's own directories.
  • Database - a SQLite database, opened once, with migrations.
  • Assets - preload images a screen should not pop in with.

Media and camera

  • Image picker - pick a photo from the library, or take one with the system camera.
  • Camera - <expo-camera> on screen, and a picture taken from it.
  • Player - a video or audio player with readable, releasable state.

Location and identity

  • Location - a position signal, filled once or followed continuously.
  • Maps - <expo-map>, Apple Maps on iOS and Google Maps on Android, with markers and taps.
  • Biometrics - Face ID, Touch ID and fingerprint unlock.
  • Browser - an in-app browser, and a sign-in session.

Intelligence

  • On-device AI - Apple Foundation Models and Gemini Nano, streamed into a template, with nothing leaving the phone.

App lifecycle

  • Fonts - register custom faces with the platform before the first frame.
  • Splash screen - hold the native splash until the app is ready.
  • Updates - check for and apply an over-the-air update.

Native views

  • Native views - register an Expo module's view, or a community library's, as an element.
  • Expo UI - real SwiftUI and Jetpack Compose controls as elements.

Web interop

  • DOM components - an Angular component rendered by a browser, in a web view inside a native screen.

Angular components as native iOS and Android views, built and shipped with Expo.

An alpha. MIT licensed. Sponsor its development.

An independent project, not affiliated with or endorsed by Google, the Angular team or Expo. Angular is a trademark of Google LLC.