Trigger bottom-sheet native modals, contextual action sheets, and custom dialog overlays from web view triggers.
Trigger native bottom-sheet modal overlays and contextual action sheets. Nativine embeds native iOS UISheetPresentationController and Android BottomSheetDialog viewports, allowing web view triggers to present high-performance native dialogs.
Contextual bottom sheets provide fluid UI transitions for filter menus, share options, and action confirmations. Nativine's Multi-Purpose Modal plugin renders OS-native bottom sheet containers:
medium, large).To trigger a native bottom sheet or action list in JavaScript, call nativine.modals.showActionSheet():
nativine.modals.showActionSheet({
title: 'Choose Action',
message: 'Select what you would like to do with this item.',
options: [
{ label: 'Share Item', icon: 'share', id: 'opt_share' },
{ label: 'Delete Item', icon: 'trash', isDestructive: true, id: 'opt_delete' }
],
callback: 'onActionSheetOptionSelected'
});
function onActionSheetOptionSelected(selection) {
console.log("User selected option ID:", selection.optionId);
}
| Parameter | Type | Description |
|---|---|---|
title | string | Required. Modal header title string. |
options | array | Required. Array of option items with label, id, and optional isDestructive flags. |
Yes. Native bottom sheets support interactive swipe-to-dismiss gestures with smooth spring physics.
Yes. Call nativine.modals.openUrlModal({ url: 'https://domain.com/terms' }) to render web pages inside a modal container.