Yii Framework Twitter Bootstrap 5 Extension

dev-master / 3.0.x-dev 2023-11-21 16:30 UTC

This package is auto-updated.

Last update: 2023-11-21 16:30:37 UTC


68747470733a2f2f796969736f66742e6769746875622e696f2f646f63732f696d616765732f7969695f6c6f676f2e737667 68747470733a2f2f76342d616c7068612e676574626f6f7473747261702e636f6d2f6173736574732f6272616e642f626f6f7473747261702d736f6c69642e737667

Yii Framework Twitter Bootstrap 5 Extension

This Yii Framework extension encapsulates [Twitter Bootstrap 5] components and plugins in terms of Yii widgets, and thus makes using Bootstrap components/plugins in Yii applications extremely easy.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis type-coverage


The preferred way to install this extension is through composer.

php composer.phar require --prefer-dist yiisoft/yii-bootstrap5

Install assets

There are several ways to install the assets, they are:

  1. Using the AssetPackagist package manager.

Add to composer.json the following:

    "require": {
        "npm-asset/bootstrap": "^5.3",
        "oomphinc/composer-installers-extender": "^2.0"
    "extra": {
        "installer-types": [
        "installer-paths": {
            "./node_modules/{$name}": [
    "repositories": [
            "type": "composer",
            "url": "https://asset-packagist.org"

Once the changes are made, you can install the assets using the following command:

composer update
  1. Using the npm-asset package manager.

Run the following command at the root directory of your application.

npm i bootstrap@5.3.1

General usage

For example, the following single line of code in a view file would render a Bootstrap Progress plugin:

<?= Yiisoft\Yii\Bootstrap5\Progress::widget()
    ->label('test') ?>

Unit testing

The package is tested with PHPUnit. To run tests:


Mutation testing

The package tests are checked with Infection mutation framework. To run it:


Static analysis

The code is statically analyzed with Psalm. To run static analysis:


Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack


The Yii Framework Twitter Bootstrap 5 Extension is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.