https://github.com/yiisoft/bootstrap5
Yii Framework Bootstrap 5 support
https://github.com/yiisoft/bootstrap5
bootstrap bootstrap5 hacktoberfest optionalforframeworkannounce yii3
Last synced: 2 months ago
JSON representation
Yii Framework Bootstrap 5 support
- Host: GitHub
- URL: https://github.com/yiisoft/bootstrap5
- Owner: yiisoft
- License: bsd-3-clause
- Created: 2020-06-22T20:51:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T08:34:46.000Z (2 months ago)
- Last Synced: 2025-04-03T09:32:28.261Z (2 months ago)
- Topics: bootstrap, bootstrap5, hacktoberfest, optionalforframeworkannounce, yii3
- Language: PHP
- Homepage: https://www.yiiframework.com/
- Size: 793 KB
- Stars: 64
- Watchers: 17
- Forks: 21
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
Yii Framework Twitter Bootstrap 5 Extension
[](https://packagist.org/packages/yiisoft/bootstrap5)
[](https://packagist.org/packages/yiisoft/bootstrap5)
[](https://github.com/yiisoft/bootstrap5/actions?query=workflow%3Abuild)
[](https://codecov.io/gh/yiisoft/bootstrap5)
[](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/bootstrap5/master)
[](https://github.com/yiisoft/bootstrap5/actions?query=workflow%3A%22static+analysis%22)
[](https://shepherd.dev/github/yiisoft/bootstrap5)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.## Requirements
- PHP 8.1 or higher.
## Installation
The package could be installed with [Composer](https://getcomposer.org):
```shell
composer require yiisoft/bootstrap5
```## Install assets
There are several ways to install the assets, they are:
1. Using the [AssetPackagist](https://asset-packagist.org/) package manager.
Add to composer.json the following:
```json
{
"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:
```shell
composer update
```2. Using the [npm-asset](https://www.npmjs.com/) package manager.
Run the following command at the root directory of your application.
```shell
npm i [email protected]
```## Using the [yiisoft/assets](https://github.com/yiisoft/assets) package
To use the asset classes in the `src/Assets` directory (such as `BootstrapAsset` and `BootstrapCdnAsset`), you need to
install additional packages:
```shell
composer require yiisoft/assets yiisoft/files
```## General usage
For example, the following single line of code in a view file would render a Bootstrap Progress plugin:
```php
= Yiisoft\Bootstrap5\Progress::widget()
->percent('60')
->label('test') ?>
```## Documentation
- [Twitter Bootstrap 5.3](https://getbootstrap.com/docs/5.3/getting-started/introduction/)
- Guide:
- [English](docs/guide/en/README.md)
- [Internals](docs/internals.md)If you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that.
You may also check out other [Yii Community Resources](https://www.yiiframework.com/community).## License
The Yii Framework Twitter Bootstrap 5 Extension is free software. It is released under the terms of the BSD License.
Please see [`LICENSE`](./LICENSE.md) for more information.Maintained by [Yii Software](https://www.yiiframework.com/).
## Support the project
[](https://opencollective.com/yiisoft)
## Follow updates
[](https://www.yiiframework.com/)
[](https://twitter.com/yiiframework)
[](https://t.me/yii3en)
[](https://www.facebook.com/groups/yiitalk)
[](https://yiiframework.com/go/slack)[Yii Framework]: https://www.yiiframework.com/
[Twitter Bootstrap 5]: https://getbootstrap.com/docs/5.3/getting-started/introduction/