Available positions
The package provides the following position options:top-right- Top right corner (default)top-left- Top left cornertop-center- Top center of the screenbottom-right- Bottom right cornerbottom-left- Bottom left cornerbottom-center- Bottom center of the screen
These positions are defined in the
ToastPosition enum at src/Enums/ToastPosition.php in the package source code.Global configuration
You can set the default position for all toasts in your application.Backend (PHP)
Publish the config file and set theposition option:
config/inertia-toast.php
Frontend (Vue 3)
Set the position when registering the plugin:resources/js/app.js
Frontend (React)
Set the position in theToastProvider config:
resources/js/app.tsx
Per-toast position override
Currently, the package supports setting a global position that applies to all toasts. Individual per-toast position overrides are not supported in the current version.Position behavior
Toasts will stack vertically within their configured position:- Top positions (
top-right,top-left,top-center): New toasts appear at the top of the stack, pushing older toasts down - Bottom positions (
bottom-right,bottom-left,bottom-center): New toasts appear at the bottom of the stack, pushing older toasts up
max_visible), the oldest toast is automatically removed to make room for the new one.
Choosing the right position
Here are some guidelines for choosing toast positions:top-right- Most common choice, doesn’t interfere with main contenttop-center- Best for important notifications that need immediate attentionbottom-right- Good alternative to top-right, keeps the top of the screen cleartop-left- Useful if your UI has important elements in the top-rightbottom-left- Less common, but works well with certain layoutsbottom-center- Great for action confirmations like “Item deleted” or “Saved”