Download the PHP package thbappy7706/laravel-toastify without Composer
On this page you can find all versions of the php package thbappy7706/laravel-toastify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thbappy7706/laravel-toastify
More information about thbappy7706/laravel-toastify
Files in thbappy7706/laravel-toastify
Package laravel-toastify
Short Description A beautiful, customizable toast notification package for Laravel Blade and Livewire v3/v4 with bouncing animations inspired by react-toastify
License MIT
Homepage https://github.com/thbappy7706/laravel-toastify
Informations about the package laravel-toastify
Laravel Toastify
A feature-rich, customizable toast notification package for Laravel Blade and Livewire v3/v4, inspired by react-toastify. Includes beautiful bouncing animations and extensive customization options.
π Live Demo
π View Live Demo
Features
β¨ Multiple Animations: Bounce (default), Slide, Zoom, Flip
π― Flexible Positioning: 6 positions (top-left, top-right, top-center, bottom-left, bottom-right, bottom-center)
π¨ Toast Types: Success, Error, Warning, Info, Default
β±οΈ Auto-close: Customizable duration or disable
π Progress Bar: Visual countdown timer
π±οΈ Drag to Dismiss: Swipe or drag toasts away
βΈοΈ Pause on Hover: Auto-pause timer when hovering
π Multiple Themes: Light, Dark, Colored
π RTL Support: Right-to-left text direction
π± Responsive: Mobile-friendly
β‘ Livewire v3/v4 Compatible: Real-time updates
π Stackable: Multiple toasts display beautifully
Requirements
- PHP 8.1+
- Laravel 10.x, 11.x, or 12.x
- Livewire 3.x or 4.x
Installation
-
Install via Composer:
- Publish the config, views, and assets:
Setup
For Livewire Applications
Add the Livewire component to your layout file (usually resources/views/layouts/app.blade.php):
For Traditional Blade Applications
Use the Blade directive in your layout:
Usage
Basic Usage
In Controllers (Redirects)
In Livewire Components
In JavaScript (Frontend)
Advanced Usage
Custom Options
Available Options
| Option | Type | Default | Description |
|---|---|---|---|
autoClose |
int/false | 5000 | Auto close duration in ms (false to disable) |
position |
string | 'top-right' | Position of toast |
transition |
string | 'bounce' | Animation type (bounce, slide, zoom, flip) |
hideProgressBar |
bool | false | Hide the progress bar |
closeButton |
bool | true | Show close button |
pauseOnHover |
bool | true | Pause timer on hover |
pauseOnFocusLoss |
bool | true | Pause when window loses focus |
draggable |
bool | true | Enable drag to dismiss |
draggablePercent |
int | 80 | Percentage of width to dismiss |
rtl |
bool | false | Right-to-left direction |
Available Positions
top-lefttop-centertop-rightbottom-leftbottom-centerbottom-right
Available Transitions
bounce- Bouncing effect (default)slide- Sliding effectzoom- Zoom in/out effectflip- Flipping effect
Available Toast Types
success- Green toast with checkmark iconerror- Red toast with error iconwarning- Yellow toast with warning iconinfo- Blue toast with info icondefault- White toast without icon
Container Customization
You can customize the container globally:
Programmatic Control
Remove Specific Toast
Clear All Toasts
Configuration
The configuration file is located at config/toastify.php:
Environment Variables
You can set defaults in your .env file:
Styling & Theming
Themes
Available themes:
light- Light background (default)dark- Dark backgroundcolored- Background matches toast type color
Change theme in config:
Custom Styling
You can customize the CSS by editing the published CSS file at public/vendor/toastify/css/toastify.css or by overriding CSS variables:
Examples
Success Notification
Error with Custom Duration
Warning at Bottom
Info with Slide Animation
Multiple Toasts
RTL Support
Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
Credits
Inspired by react-toastify by Fadi Khadra.
License
The MIT License (MIT). Please see License File for more information.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please file an issue on the GitHub repository.
All versions of laravel-toastify with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
livewire/livewire Version ^3.0|^4.0