Download the PHP
package jeremykenedy/laravel-toast without Composer
On this page you can find all versions of the php package
jeremykenedy/laravel-toast. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Powerful, highly configurable toast notifications for Laravel with 56 animations, 19 per-toast props, RTL support, dark mode, and full CSS/frontend framework parity.
`:
Or with the directive: `@toasts`
For Livewire: ``
## Quick Start
Existing flash messages work automatically:
## Configuration
Every config option is also an ENV variable and a per-toast prop override:
## Props Reference
All props work as global config defaults AND per-toast overrides.
| Prop | Default | Options |
| -------------------- | ----------- | -------------------------------------------------------------------------------- |
| `position` | `top-right` | `top-left` `top-right` `top-center` `bottom-left` `bottom-right` `bottom-center` |
| `dir` | `ltr` | `ltr` `rtl` |
| `duration` | `5000` | Milliseconds (0 = no auto-dismiss) |
| `auto_dismiss` | `true` | `true` `false` |
| `pause_on_hover` | `true` | `true` `false` |
| `stack` | `true` | `true` (accumulate) `false` (replace) |
| `max_visible` | `5` | Any integer |
| `show_icon` | `true` | `true` `false` |
| `custom_icon` | `null` | Raw SVG HTML string |
| `show_border` | `true` | `true` `false` |
| `show_close` | `true` | `true` `false` |
| `show_progress` | `true` | `true` `false` |
| `progress_direction` | `rtl` | `rtl` `ltr` |
| `progress_position` | `top` | `top` `bottom` |
| `opacity` | `1` | `0` to `1` |
| `enter_animation` | `none` | See [Animations](#animations) |
| `enter_duration` | `0.5` | Seconds |
| `exit_animation` | `none` | See [Animations](#animations) |
| `exit_duration` | `0.5` | Seconds |
### Per-Toast Override
## Animations
56 animation styles available for both `enter_animation` and `exit_animation`.
Directionless names (e.g., `slide`, `bounce`) use a sensible default (typically center or right):
| Style | Enter | Exit |
| -------------------- | ---------------------------------------------- | ------------------------------------- |
| `none` | Instant appear | Instant remove |
| **Fade** | | |
| `fade` | Fade in | Fade out |
| `fade-center` | Fade in (alias) | Fade out (alias) |
| **Slide** | | |
| `slide` | Slide in from right (default) | Slide out to right (default) |
| `slide-left` | Slide in from left | Slide out to left |
| `slide-right` | Slide in from right | Slide out to right |
| `slide-top` | Slide in from top | Slide out to top |
| `slide-bottom` | Slide in from bottom | Slide out to bottom |
| **Bounce** | | |
| `bounce` | Scale up, overshoot, settle (default) | Scale up, overshoot, shrink (default) |
| `bounce-left` | Overshoot from left then settle | Bounce right then exit left |
| `bounce-right` | Overshoot from right then settle | Bounce left then exit right |
| `bounce-top` | Overshoot from top then settle | Bounce down then exit top |
| `bounce-bottom` | Overshoot from bottom then settle | Bounce up then exit bottom |
| `bounce-center` | Scale up, overshoot, settle | Scale up, overshoot, shrink |
| **Shrink** | | |
| `shrink` | Scale up from center (default) | Scale down to center (default) |
| `shrink-left` | Expand from right edge | Collapse toward right edge |
| `shrink-right` | Expand from left edge | Collapse toward left edge |
| `shrink-top` | Expand from bottom edge | Collapse toward bottom edge |
| `shrink-bottom` | Expand from top edge | Collapse toward top edge |
| `shrink-center` | Scale up from center | Scale down to center |
| **Flip** (3D) | | |
| `flip` | Flip in 180 Y-axis (default) | Flip out 180 Y-axis (default) |
| `flip-left` | Flip in from right (Y-axis) | Flip out to left (Y-axis) |
| `flip-right` | Flip in from left (Y-axis) | Flip out to right (Y-axis) |
| `flip-top` | Flip in from bottom (X-axis) | Flip out to top (X-axis) |
| `flip-bottom` | Flip in from top (X-axis) | Flip out to bottom (X-axis) |
| `flip-center` | Flip in 180 (Y-axis) | Flip out 180 (Y-axis) |
| **Spin** | | |
| `spin` | Spin in + scale up (default) | Spin out + scale down (default) |
| `spin-left` | Spin in from left | Spin out to left |
| `spin-right` | Spin in from right | Spin out to right |
| `spin-top` | Spin in from top | Spin out to top |
| `spin-bottom` | Spin in from bottom | Spin out to bottom |
| `spin-center` | Spin in + scale up | Spin out + scale down |
| **Grow** | | |
| `grow` | Scale up from center (default) | Scale down to center (default) |
| `grow-left` | Scale up from right edge | Scale down toward right edge |
| `grow-right` | Scale up from left edge | Scale down toward left edge |
| `grow-top` | Scale up from bottom edge | Scale down toward bottom edge |
| `grow-bottom` | Scale up from top edge | Scale down toward top edge |
| `grow-center` | Scale up from center | Scale down to center |
| **Slam** (overshoot) | | |
| `slam` | Scale from 0, overshoot 120%, settle (default) | Overshoot 115%, scale to 0 (default) |
| `slam-left` | Fly in from left, overshoot 115%, settle | Overshoot 115%, fly out left |
| `slam-right` | Fly in from right, overshoot 115%, settle | Overshoot 115%, fly out right |
| `slam-top` | Fly in from top, overshoot 115%, settle | Overshoot 115%, fly out top |
| `slam-bottom` | Fly in from bottom, overshoot 115%, settle | Overshoot 115%, fly out bottom |
| `slam-center` | Scale from 0, overshoot 120%, settle | Overshoot 115%, scale to 0 |
| **Wobble** | | |
| `wobble` | Wobble side-to-side then appear (default) | Wobble side-to-side then disappear |
| `wobble-left` | Wobble in from left | Wobble then exit left |
| `wobble-right` | Wobble in from right | Wobble then exit right |
| `wobble-top` | Wobble in from top | Wobble then exit top |
| `wobble-bottom` | Wobble in from bottom | Wobble then exit bottom |
| `wobble-center` | Wobble + scale up from center | Wobble + scale down to center |
Enter and exit animations have independent duration controls (`enter_duration`, `exit_duration`).
## Dark Mode
All three CSS frameworks support dark mode:
**Tailwind v4** uses `dark:` variant classes automatically. No extra setup needed.
**Bootstrap 5** uses `text-bg-*` classes that respect `[data-bs-theme="dark"]`. Add to your `` tag:
**Bootstrap 4** uses inline styles for dark mode. The toast views detect `.dark` on the body class or `prefers-color-scheme: dark` media query.
## Customizing Colors
### Tailwind v4
Override toast colors via your `app.css` with theme accent variables or direct utility overrides:
Or publish and edit the views directly:
### Bootstrap 5
Override Bootstrap contextual colors in your stylesheet:
### Bootstrap 4
Override Bootstrap 4 alert colors:
## Usage
### Facade
### HasToasts Trait
### Livewire Events
### Vue / React / Svelte
Pass toasts via Inertia props or `window.__toasts`:
## Changing Frameworks
After installation, use **update** or **switch** to change frameworks without losing configuration.
### Update (Interactive)
The update command walks through framework selection with an interactive menu:
Or pass options directly:
| Option | Values | Description |
|--------|--------|-------------|
| `--css` | `tailwind`, `bootstrap5`, `bootstrap4` | Change CSS framework |
| `--frontend` | `blade`, `livewire`, `vue`, `react`, `svelte` | Change frontend framework |
### Switch (Quick)
After switching, run `npm run build`.
## Artisan Commands
| Command | Description |
|---------|-------------|
| `toast:install` | Fresh install with interactive prompts. Detects existing installation. |
| `toast:update` | Update framework selection interactively. Does not overwrite config. |
| `toast:switch` | Quick framework switch via flags. |
### Install Options
| Flag | Description |
|------|-------------|
| `--css=` | CSS framework: `tailwind`, `bootstrap5`, `bootstrap4` |
| `--frontend=` | Frontend: `blade`, `livewire`, `vue`, `react`, `svelte` |
| `--force` | Skip reinstall confirmation when already installed |
### Publishing Assets
## Testing
## License
This package is open-sourced software licensed under the [MIT license](LICENSE).
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package jeremykenedy/laravel-toast contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.