Skip to content

learn how to install and configure SweetAlert2 in Laravel 12 using Vite. A complete step-by-step guide for adding modern, interactive alert popups to your Laravel project.

Notifications You must be signed in to change notification settings

itstuffsolutions/laravel-12-how-to-install-sweetalert2-with-vite

Repository files navigation

Laravel 12 + SweetAlert2 + Vite – Installation Example

Easily integrate SweetAlert2 into your Laravel 12 project using the modern build tool Vite. This repository contains example code and setup instructions that accompany the blog post:
👉 How to Install SweetAlert2 with Vite in Laravel 12


🚀 What This Repo Includes

  • Step-by-step setup for SweetAlert2 via npm in a Laravel 12 + Vite environment
  • Code snippets for resources/js/app.js and Blade templates
  • Example usage of SweetAlert2 (pop-up alerts, confirmation dialogues) after actions
  • Tips for configuring aliasing, global window object, and building assets
  • Best-practices for user-friendly alerts and UX improvements

🔧 Quick Setup Snippet

npm install sweetalert2

Releases

No releases published

Packages

No packages published

Languages