covaleski/laravel-bootstrap-5

Bootstrap 5 components for Laravel.

Maintainers

Package info

github.com/covaleski/laravel-bootstrap-5

pkg:composer/covaleski/laravel-bootstrap-5

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.4.0 2026-05-03 17:44 UTC

This package is auto-updated.

Last update: 2026-05-03 17:46:34 UTC


README

Bootstrap 5 Blade components for Laravel.

Installation

Install this package using the Composer package manager:

composer require covaleski/laravel-bootstrap-5

Usage

First, include CSS and JS assets to the view using the @bootstrap_css and @bootstrap_js directives:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        @bootstrap_css
        <title>Bootstrap demo</title>
    </head>
    <body>
        <h1>Hello, world!</h1>
        @bootstrap_js
    </body>
</html>

If you intend to preload Bootstrap's stylesheets, use the @bootstrap_css_preload directive. Place it somewhere before the @bootstrap_css directive.

After including assets to the view, add the components you want to your Blade templates:

<x-bs::alert primary>
    A simple primary alert—check it out!
</x-bs::alert>

See all available components in Components.

Icons

Use the @bootstrap_icons and the @bootstrap_icons_preload directives just like the CSS directives to add Bootstrap's icon library to your application.

Configuration

By default, Bootstrap assets are loaded via CDN. You can change it in the config/bootstrap.php configuration file.