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.
The preferred way to install this extension is through composer.
php composer.phar require --prefer-dist yiisoft/yii-bootstrap5
There are several ways to install the assets, they are:
- 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": [
"npm-asset"
],
"installer-paths": {
"./node_modules/{$name}": [
"type:npm-asset"
]
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
Once the changes are made, you can install the assets using the following command:
composer update
- Using the npm-asset package manager.
Run the following command at the root directory of your application.
npm i [email protected]
For example, the following single line of code in a view file would render a Bootstrap Progress plugin:
<?= Yiisoft\Yii\Bootstrap5\Progress::widget()
->percent('60')
->label('test') ?>
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
The package tests are checked with Infection mutation framework. To run it:
./vendor/bin/infection
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
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.