ToastKit

Efekpogua Victory

AuthorEfekpogua VictoryPlugin TypeCommunity PluginPriceFreeVersionv1.3.0LicenseMIT
NativePHP^4.1PHP^8.4iOS18.0+Android29+

Rich, customizable native toast notifications for NativePHP Mobile — rendered as native overlays using Jetpack Compose (Android) and SwiftUI (iOS).

Features

  • 5 toast variants — success, error, warning, info, neutral
  • Customizable styling — colors, corner radius, padding, shadows
  • Rich content — title, message, icons with platform-specific overrides
  • Native action buttons with event handling
  • Queue and stack display strategies
  • Live updates — modify a toast without recreating it
  • Swipe-to-dismiss and close controls
  • JavaScript API for Inertia, Vue, and React
  • Testing macros for assertion-based validation

Installation

composer require victorycodedev/toastkit
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register victorycodedev/toastkit

Usage

use Victorycodedev\Toastkit\Facades\Toast;

Toast::success('Saved!', 'Your changes have been saved.');
Toast::error('Failed', 'Something went wrong.');
Toast::warning('Heads up', 'This action cannot be undone.');
Toast::info('Update available', 'A new version is ready.');

Events

use Victorycodedev\Toastkit\Events\ToastShown;
use Victorycodedev\Toastkit\Events\ToastDismissed;
use Victorycodedev\Toastkit\Events\ToastActionPressed;