Menu

How to Install Bootstrap 5 in Laravel 13 with Vite and Sass
📰

How to Install Bootstrap 5 in Laravel 13 with Vite and Sass

DEV Community: css·Muhammad Yasir Amin·4 days ago
#rwZLQnu1
#devtocss#devto#dev#bootstrap#sass
Reading 0:00
15s threshold

To use Bootstrap 5 in Laravel 13, install bootstrap , @popperjs/core and sass with npm, import the Bootstrap Sass file in your stylesheet and the Bootstrap JavaScript in resources/js/app.js , and load both through @vite in your Blade layout. A new Laravel 13 project uses Tailwind CSS by default, so this guide also shows what to change so the two do not clash.

Targets: Laravel 13 (PHP 8.3 to 8.5), Vite, Node.js and Bootstrap 5.3. Check the Bootstrap documentation for any newer 5.x notes.

Step 1: Install the packages

npm install bootstrap @popperjs/core npm install --save-dev sass

Enter fullscreen mode

Exit fullscreen mode

Bootstrap's components (dropdowns, tooltips, popovers) need Popper.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.