kukrik / qcubed-apptoast
QCubed-4 plugin for AppToast component
Package info
github.com/kukrik/qcubed-apptoast
Language:JavaScript
Type:qcubed-library
pkg:composer/kukrik/qcubed-apptoast
Requires
- php: >=8.3
This package is auto-updated.
Last update: 2026-07-01 16:12:01 UTC
README
AppToast for QCubed-4
The AppToast plugin is a lightweight wrapper around the excellent Toastify JS library, allowing developers to display elegant toast notifications in QCubed-4 applications.
Unlike many existing QCubed plugins, this component demonstrates that QCubed-4 can seamlessly integrate modern Vanilla JavaScript libraries, without relying on jQuery.
The plugin provides a simple QCubed API while Toastify JS handles rendering, animations, and toast stacking.
Features
- Wrapper around the Toastify JS library
- No jQuery dependency
- Lightweight and reusable
- Supports success, warning, error and info notifications
- Configurable duration, position, gravity and offset
- Compatible with PHP 8.3+
Credits
This plugin uses the open source Toastify JS library created by Apoorv Varun.
GitHub: https://github.com/apvarun/toastify-js
Documentation & examples: https://apvarun.github.io/toastify-js/
Requirements
- PHP 8.3 or newer
- QCubed-4
Installation
This plugin is installed via Composer:
composer require kukrik/qcubed-apptoast
Basic usage
$this->objToast = new AppToast($this); $this->objToast->Type = 'warning'; $this->objToast->Position = 'center'; $this->objToast->Text = 'Please enter at least 3 characters.'; // Display the toast notification $this->objToast->showToast();
Example
protected function btnSearch_Click(ActionParams $params): void { $this->objToast->Type = 'warning'; $this->objToast->Text = 'Please enter at least 3 characters.'; $this->objToast->showToast(); }
Available toast types:
successwarningerrorinfo
AppToast is a reusable notification component for QCubed-4. It can be used throughout the application for validation messages, Ajax callbacks, success notifications, and error reporting.
