Download the PHP package nativephp/mobile-dialog without Composer
On this page you can find all versions of the php package nativephp/mobile-dialog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nativephp/mobile-dialog
More information about nativephp/mobile-dialog
Files in nativephp/mobile-dialog
Package mobile-dialog
Short Description Native alert dialogs and toast notifications for NativePHP Mobile
License MIT
Informations about the package mobile-dialog
Dialog Plugin for NativePHP Mobile
Native alert dialogs and toast notifications for NativePHP Mobile applications.
Overview
The Dialog API provides cross-platform native alert dialogs and toast/snackbar notifications.
Installation
Usage
Alert Dialogs
PHP (Livewire/Blade)
JavaScript (Vue/React/Inertia)
Toast Notifications
PHP
JavaScript
Configuration Methods
Alert Methods
id(string $id)
Set a unique identifier for the alert. Useful for identifying which alert triggered a button press.
event(string $eventClass)
Specify a custom event class to dispatch when a button is pressed.
remember()
Store the alert ID in session for retrieval in event handlers.
show()
Explicitly display the alert. If not called, the alert shows automatically when the object is destructed.
Toast Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
message |
string | required | The message to display |
duration |
string | 'long' |
'short' (2s) or 'long' (4s) |
Events
ButtonPressed
Fired when a button in an alert dialog is tapped.
Properties:
int $index- The button index (0-based)string $label- The button label textstring|null $id- The alert ID (if set)
PHP
Vue
Platform Behavior
Alert Dialogs
- Android: Native
AlertDialogviaNativeActionCoordinator - iOS: Native
UIAlertControllerwith.alertstyle
Toast Notifications
- Android: Material Design
Snackbar(positioned above bottom navigation) - iOS: Custom
ToastManageroverlay