
Trigger toasts from anywhere
Toast notifications can be triggered from both your backend (PHP) and frontend (JavaScript). UseToast::success('Saved!') in your controllers or useToast().success('Copied!') in your components — same beautiful toasts either way.
Key features
Fluent PHP API
Use
toast('Saved!')->success() or Toast::success('Saved!') for intuitive toast creationMulti-framework support
Dedicated Vue 3 and React adapters with full TypeScript support
Position-aware
6 position options: top-right, top-left, top-center, bottom-right, bottom-left, bottom-center
Tailwind CSS styling
Beautiful designs using Tailwind CSS (v3 & v4 compatible)
Optional titles
Add context with optional toast titles for important notifications
Beautiful animations
Smooth in/out animations for a polished user experience
What makes it special
Redirect-safe
Toasts persist across redirects, making them perfect for form submissions and controller actions that redirect users to different pages.Multi-toast support
Display multiple toasts simultaneously with configurable maximum visible limit. Oldest toasts are automatically removed when the limit is exceeded.Client-side API
Both Vue and React adapters expose auseToast() composable/hook for triggering toasts from the frontend, giving you complete flexibility in how you notify users.
Type-safe
Full TypeScript support in both Vue and React adapters ensures you catch errors at compile time.Quick links
Installation
Install and set up Laravel Inertia Toast in your project
Quickstart
Get your first toast working in minutes
Server-side usage
Learn how to use the PHP API
Client-side usage
Use the Vue and React APIs
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- Inertia.js v2.3.3+
- Vue 3.3+ or React 18+
- Tailwind CSS v3 or v4
Packages
Laravel Inertia Toast consists of three packages:| Package | Description |
|---|---|
veekthoven/laravel-inertia-toast | PHP package — Facade, helper, Inertia flash integration |
@laravel-inertia-toast/vue | Vue 3 adapter — Plugin, composable, components |
@laravel-inertia-toast/react | React adapter — Provider, hook, components |
You can install and use the frontend adapters without the backend package. But to use the backend package, you need to install and set up the adapter for your frontend framework. For the full experience, use both backend and frontend packages in a Laravel + Inertia.js app.