Native UI
Show native banners, alerts, popups, menus, pickers, and control the status bar and orientation from your web code.
Set up
Use bdk.ui to drive native surfaces from your web code. Calls that return a value (menu taps, popup buttons, picks) deliver it on an event — subscribe with bdk.on(...) before you call.
Outside the app these calls don't run (triggered: false) and no native surface appears. Provide a web fallback for anything the user must respond to.
Show an alert
Show a blocking system alert the user must acknowledge before continuing.
Ask the user to confirm
Show a popup with action buttons. The pressed button arrives on the popupClosed event — subscribe first.
The popupClosed payload tells you which button dismissed the popup — the OK or Cancel button.
Prompt for an app-store rating
Show the OS rating prompt at a natural moment.
Pick a date or option
Open a native date/time picker or option list. Date/time picks arrive on datePicked; option picks arrive on optionPicked. Subscribe to the one your picker produces before you call.
Style the status bar
Set the status-bar color and light/dark content.
Control screen orientation
Set or lock the screen orientation.
lockOrientation is Android-only and is skipped on iOS.
Disable the iOS back-swipe
Suppress the iOS left-edge back-swipe when a screen owns that gesture itself.
iOS only. Skipped on Android.
Event reference
Register handlers with bdk.on(event, listener), which returns an unsubscribe function.
menuClicked— the menu item the user tapped (its title and data).popupClosed— which button dismissed the popup.datePicked— the date/time the user selected.optionPicked— the option the user chose.
A throwing listener surfaces once as a BdkError with code BDK_LISTENER_ERROR, via both the onError config callback and the error event.