Skip to main content
Orb UI renders web elements. In an Expo app, put the artwork in a DOM component and keep the voice session on the native side. Only the state and two meter readings cross the WebView boundary. Liora uses this pattern for its iOS cloud orb. Liora’s component

Create the web component

In an existing Expo Router app with web support, run npm install orb-ui. Expo SDK 56 and later provide the DOM WebView. For SDK 55 and earlier, also run npx expo install react-native-webview. If your project has no web setup, install @expo/metro-runtime, react-dom, and react-native-web with npx expo install. Expo DOM setup Save this file as components/VoiceOrb.tsx, outside the router’s app directory. Keep the directive on the first line. Expo consumes the optional dom prop to configure the native wrapper.

Drive the orb from a native screen

Save this screen as app/index.tsx, adjusting the import if your app uses src/app. These buttons simulate turns so you can check the bridge before starting a real call.

Connect native audio

Replace the buttons with your native session’s turn events and metering callback. Keep recorder objects, playback objects, and raw PCM buffers in native code. Send a few numeric updates per second to start and increase the rate only if motion looks stepped. For decibel meters, convert to an amplitude with 10 ** (dB / 20), then calibrate the quiet and ordinary speech levels. Volume calibration Run the app on an iPhone. Switch between listening, speaking, and idle. Then background it during a turn and stop the session. Your native session owner should handle interruption, stop audio, and reset the displayed signal when capture ends. If the orb area is empty, first check that its native parent has a nonzero width and height and that the web component loads with the circle theme.
Last modified on November 26, 2026