twbs/bootstrap
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development. It ships with prebuilt CSS and JS, Sass sources, and icons for building responsive, mobile-first sites.
Heads-up: the latest tag is v6.0.0-alpha.1 — a pre-release with no published release notes. Do not treat it as a drop-in upgrade. For day-to-day Laravel work, stay pinned to the stable line:
composer require twbs/bootstrap:^5.3.8
Only pull the alpha into a throwaway branch when you explicitly want to evaluate v6:
composer require twbs/bootstrap:v6.0.0-alpha.1
Note that Composer will not resolve ^6.0 to a pre-release unless you lower the minimum-stability or add an explicit constraint — which is a useful safety net.
For the stable 5.3.x workflow (unchanged): the package ships compiled CSS/JS plus source SCSS. Import the SCSS in resources/css/app.css (@import 'bootstrap/scss/bootstrap';) and compile with Vite. First use case: add a Bootstrap container and grid classes to a Blade template (<div class="container">...</div>) and confirm the compiled stylesheet loads.
Because no changelog accompanies v6.0.0-alpha.1, treat the v6 surface as undocumented for now — check the repo's v6-dev branch, migration guide, and dist tags directly before relying on anything.
^5.3.8 on main for anything shipping to production, and add a separate branch/composer constraint for v6.0.0-alpha.1 spike work. This avoids accidentally inheriting alpha breaking changes in feature branches.<div x-data="{ open: false }" @click.away="open = false">
<button @click="open = true">Toggle Modal</button>
<div x-show="open" style="display: none;" @click.stop>
<div class="modal" style="display: block;">
<!-- Modal content -->
</div>
</div>
</div>
$primary: #0d6efd;
$primary-rgb: rgb_var($primary);
$primary-contrast: color-contrast($primary-rgb);
import { Modal, Tooltip } from 'bootstrap';
$wire.on('modal.show', (id) => new bootstrap.Modal(`#${id}`).show());
data-bs-* attribute and utility class you depend on, and smoke-test each interactive component. Record findings in a migration note so the eventual stable upgrade is mechanical.The alpha has no release notes, so the only reliable way to learn the delta is to diff the published package against 5.3.x locally:
diff -r vendor/twbs/bootstrap/scss /path/to/bootstrap-5.3.8/scss | less
Treat everything you find as provisional until a stable v6 changelog exists.
v6.0.0-alpha.1 was published without a changelog body. Do not assume which SCSS variables, JS data attributes, or utility classes changed. Assume something did, since this is a major bump.alpha stability in CI: if you add the alpha anywhere, pin the exact version (v6.0.0-alpha.1), not a range. Alpha-to-alpha bumps routinely break builds.@import 'bootstrap/scss/bootstrap';. In 5.3.x, color-contrast() requires RGB values (e.g., rgb_var($primary)) — re-verify this signature in v6 rather than copying it forward.@popperjs/core installs unless you're doing a custom build. Confirm this still holds in v6.dist/css/bootstrap.min.css in production and scss/ for customization. Note that v5.3.8's downloadable examples ship unminified dist/ files.eval() in fallbacks. If you run a strict CSP, verify your build and whitelist 'unsafe-eval' only as a last resort.v6.0.0-alpha.1 as an experiment, not a release.How can I help you explore Laravel packages today?