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: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-04-11 23:29 UTC

This package is auto-updated.

Last update: 2026-04-11 23:31:22 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 Bootstrap CSS assets to the view using the @bootstrap_css Blade directive:

<!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>
    </body>
</html>

If you also intend to use Bootstrap's JavaScript features, also include the @bootstrap_js directive to your view:

<!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>

Then use published views as regular Laravel components:

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

See all available components in Components.

Configuration

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