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).
See
Properties
accessibleMode
Accessibility mode bitmask.
- Bit 0 (
1): VoiceOver (iOS) or TalkBack (Android) is active.
appLanguage?
App-level language setting. Not set by the SDK by default;
available for host apps to inject via setStableProps().
appLocale?
App-level locale setting. Not set by the SDK by default;
available for host apps to inject via setStableProps().
bottomHeight
Height of the bottom safe-area inset in logical points.
Equivalent to safeAreaInsets.bottom on iOS.
Platform
iOS
containerID
Unique identifier for this Sparkling container instance.
containerInitTime
Timestamp (as string) when the container was initialized.
contentHeight
Available content height, excluding top and bottom safe areas.
Computed as screenHeight - topHeight - bottomHeight.
Platform
iOS
deviceModel
Device model identifier in lowercase (e.g. "iphone15,2", "pixel 8").
isAppBackground
true if the app is currently in the background.
Platform
iOS
isIPhoneX
1 if the device is an iPhone X-series (or later with notch / Dynamic Island),
0 otherwise. Always 0 on Android.
Platform
iOS
isIPhoneXMax
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
1 if the device is in low-power / battery-saver mode, 0 otherwise.
isNotchScreen
Whether the device has a screen notch or cutout.
isPad
1 if the device is a tablet (iPad / Android tablet), 0 otherwise.
language
Preferred language code from the OS (e.g. "en-US", "zh-Hans").
lynxSdkVersion
Version of the underlying Lynx SDK.
navigationBarHeight
Height of the system navigation bar in logical points.
Platform
Android
orientation?
Numeric orientation indicator.
0 = portrait, 1 = landscape.
Platform
Android
os
Operating system identifier.
"ios"on iOS"android"on Android
osVersion
OS version string (e.g. "17.4", "14").
pixelRatio
Device pixel ratio (e.g. 2.0, 3.0).
Platform
Android
preferredTheme?
User-preferred theme setting, if different from the current applied theme.
May be undefined if no preference has been set.
queryItems
Query parameters parsed from the container's scheme URL. Each key-value pair corresponds to a query parameter.
safeAreaHeight
Safe-area height. On iOS this equals safeAreaInsets.top;
on Android it is derived from screen metrics.
screenHeight
Screen height in logical points (dp on Android, pt on iOS).
screenOrientation
Current screen orientation as a string.
Possible values: "Portrait", "PortraitUpsideDown", "LandscapeLeft",
"LandscapeRight", "Landscape", "Unknown".
screenWidth
Screen width in logical points (dp on Android, pt on iOS).
statusBarHeight
Height of the system status bar in logical points.
templateResData
Template resource data passed to the container. Contents depend on the app's template configuration.
Platform
Android
theme
Current UI theme: "dark" or "light".
Platform
Android
topHeight
Height of the top safe-area inset in logical points.
Equivalent to safeAreaInsets.top on iOS.
Platform
iOS

