Interface: GlobalProps

Global properties injected by the Sparkling native SDK into every Lynx container. Access these at runtime via lynx.__globalProps.

The native layer (iOS / Android) populates these values before the Lynx bundle starts executing. Some fields are stable (set once on app launch) and some are unstable (may change per container or over time).

Properties

accessibleMode

accessibleMode: number;

Accessibility mode bitmask.

  • Bit 0 (1): VoiceOver (iOS) or TalkBack (Android) is active.

appLanguage?

optional appLanguage: string;

App-level language setting.

Platform

Android


appLocale?

optional appLocale: string;

App-level locale setting.

Platform

Android


bottomHeight

bottomHeight: number;

Height of the bottom safe-area inset in logical points. Equivalent to safeAreaInsets.bottom on iOS.

Platform

iOS


containerID

containerID: string;

Unique identifier for this Sparkling container instance.


containerInitTime

containerInitTime: string;

Timestamp (as string) when the container was initialized.


contentHeight

contentHeight: number;

Available content height, excluding top and bottom safe areas. Computed as screenHeight - topHeight - bottomHeight.

Platform

iOS


deviceModel

deviceModel: string;

Device model identifier in lowercase (e.g. "iphone15,2", "pixel 8").


isAppBackground

isAppBackground: boolean;

true if the app is currently in the background.


isIPhoneX

isIPhoneX: number;

1 if the device is an iPhone X-series (or later with notch / Dynamic Island), 0 otherwise. Always 0 on Android.

Platform

iOS


isIPhoneXMax

isIPhoneXMax: number;

1 if the device is an iPhone X-series (or later with notch / Dynamic Island), 0 otherwise. Always 0 on Android.

Remarks

Identical to isIPhoneX in current implementations.

Platform

iOS


isLowPowerMode

isLowPowerMode: number;

1 if the device is in low-power / battery-saver mode, 0 otherwise.


isNotchScreen

isNotchScreen: boolean;

Whether the device has a screen notch or cutout.


isPad

isPad: number;

1 if the device is a tablet (iPad / Android tablet), 0 otherwise.


language

language: string;

Preferred language code from the OS (e.g. "en-US", "zh-Hans").


lynxSdkVersion

lynxSdkVersion: string;

Version of the underlying Lynx SDK.

Platform

Android


navigationBarHeight: number;

Height of the system navigation bar in logical points.

Platform

Android


orientation?

optional orientation: number;

Numeric orientation indicator. 0 = portrait, 1 = landscape.

Platform

Android


os

os: string;

Operating system identifier.

  • "ios" on iOS
  • "android" on Android

osVersion

osVersion: string;

OS version string (e.g. "17.4", "14").


pixelRatio

pixelRatio: number;

Device pixel ratio (e.g. 2.0, 3.0).

Platform

Android


preferredTheme?

optional preferredTheme: string;

User-preferred theme setting, if different from the current applied theme. May be undefined if no preference has been set.


queryItems

queryItems: Record<string, string>;

Query parameters parsed from the container's scheme URL. Each key-value pair corresponds to a query parameter.

Platform

Android


safeAreaHeight

safeAreaHeight: number;

Safe-area height. On iOS this equals safeAreaInsets.top; on Android it is derived from screen metrics.


screenHeight

screenHeight: number;

Screen height in logical points (dp on Android, pt on iOS).


screenOrientation

screenOrientation: string;

Current screen orientation as a string.

Possible values: "Portrait", "PortraitUpsideDown", "LandscapeLeft", "LandscapeRight", "Landscape", "Unknown".


screenWidth

screenWidth: number;

Screen width in logical points (dp on Android, pt on iOS).


statusBarHeight

statusBarHeight: number;

Height of the system status bar in logical points.


templateResData

templateResData: string;

Template resource data passed to the container. Contents depend on the app's template configuration.

Platform

Android


theme

theme: string;

Current UI theme: "dark" or "light".


topHeight

topHeight: number;

Height of the top safe-area inset in logical points. Equivalent to safeAreaInsets.top on iOS.

Platform

iOS