Skip to main content
Native components are UI components that are natively developed on the iOS and Android that can be used in combination with web UI components with the help of events from the JS SDK. List of native components and native features that are available to your miniapp:

AppBoxoWebAppSetNavigationBar

Activates native navigation bar. Navbar Example:
Sending event with only required changes will preserve initial options:

Tab bar

AppBoxoWebAppSetTabBar

Initialized native tab bar component tabbar Parameters
  • show required boolean Defines TabBar visibility
  • activeTab required number Active TabBar item id
  • list required Array<{ tabId: number, tabName: string, tabIcon: string }> Define tabs
  • options required { color: string, background: string, selectedColor: string, hasBorder: boolean, borderColor: string } Tab bar options
  • badges optional Array<{ tabId: number, background: string, color: string, value?: string }> Define tab item badges.
Example:
Sending event with only required changes will preserve initial options:

AppBoxoWebAppTabBarItemClick

Event that should be subscribed to in order to get active tab item click Example:

QR code reader

AppBoxoWebAppOpenQRCodeReader

Opens native QR code reader. QR Reader This method will prompt a permission request for camera. Example:
Results from QR code reader are received by events: AppBoxoWebAppOpenQRCodeReaderResult or AppBoxoWebAppOpenQRCodeReaderFailed Example:

Action sheet

AppBoxoWebAppShowActionSheet

Shows native action sheet Action Sheet Parameters
  • header optional string Action sheet header text
  • list required Array<{ id: number, text: string, role?: 'cancel' | 'destructive' | 'selected' }> Define action sheet items
Example:

AppBoxoWebAppActionSheetItemClick

Event that should be subscribed to in order to get action sheet item click Example:

Action buttons

AppBoxoWebAppSetActionButton

Changes the params of action button Action Buttons Example:

Alert

AppBoxoWebAppShowAlert

Show native alert box Alert Box Parameters
  • header optional string Alert header text
  • message optional string Alert message
  • buttons required Array<{ id: number, text: string, role?: 'cancel' | 'destructive' }> Define buttons
Example:

Geolocation

AppBoxoWebAppGetGeodata

Requests user geodata. This method will prompt a permission request to access geolocation. Geolocation Example:

Map

AppBoxoWebAppChooseLocation

Open full screen map to choose location This method will prompt a permission request to access geolocation. Map Example:

AppBoxoWebAppOpenLocation

Open full screen map to that shows markered location This method will prompt a permission request to access geolocation. Example:

AppBoxoWebAppShowImages

Open full screen native image gallery Image Gallery Parameters start_index optional number Index to start showing from images required Array<string> Image urls Example:
After image gallery is closed, the same event will be dispatched back to the miniapp with result data. Example:

Loading indicator

AppBoxoWebAppLoadingIndicator

Shows native loading indicator. Loading Indicator Important: Loading indicator will timeout after 30 seconds with prompt to hide it if no event is dispatched to change it. Example:

Haptic feedback

AppBoxoWebAppVibrate

Triggers haptic engine on the device, if available. Haptic Engine Parameters style optional 'light' | 'medium' | 'heavy' Controls strength of vibration, defaults to ‘light’. Example:

Storage

AppBoxoWebAppStorageGet

Requests a value from the storage Parameters keys required Array<string> Keys for getting ([a-zA-Z_-0-9]) Example:

AppBoxoWebAppStorageGetKeys

Request list of keys of some stored values Parameters count required number Count of keys to get. Max value is 1000 offset optional number The offset required to fetch a specific subset of keys. Default: 0 Example:

AppBoxoWebAppStorageSet

Stores value in storage Parameters key required string The key of value ([a-zA-Z_-0-9]) value optional string value Example:

AppBoxoWebAppStorageRemove

Removes value in storage Parameters key required string The key of value ([a-zA-Z_-0-9]) Example:

AppBoxoWebAppStorageClear

Clears all data in storage Example:

Clipboard

AppBoxoWebAppGetClipboard

Gets the content on the system clipboard. Example:

AppBoxoWebAppSetClipboard

Sets the content on the system clipboard. Parameters data required string Content to be copied to clipboard Example:

Accelerometer

AppBoxoWebAppStartAccelerometer

Starts listening on acceleration data. Example:

AppBoxoWebAppStopAccelerometer

Stops listening on acceleration data. Example:

AppBoxoWebAppOnAccelerometerChange

Listens on the acceleration data event. You can send AppBoxoWebAppStopAccelerometer event to stop listening. Example:

Gyroscope

AppBoxoWebAppStartGyroscope

Starts listening on gyroscope data. Example:
AppBoxoWebAppStopGyroscope Stops listening on gyroscope data. Example:

AppBoxoWebAppOnGyroscopeChange

Listens on the gyroscope data event. You can send AppBoxoWebAppStopGyroscope event to stop listening. Example:

Compass

AppBoxoWebAppStartCompass

Starts listening on compass data. Example:

AppBoxoWebAppStopCompass

Stops listening on compass data. Example:

AppBoxoWebAppOnCompassChange

Listens on the compass data event. You can send AppBoxoWebAppStopCompass event to stop listening. Example: