2021-07-09 17:53:24 +08:00
|
|
|
Asset Bundles
|
|
|
|
=============
|
|
|
|
|
|
|
|
Bootstrap is a complex front-end solution, which includes CSS, JavaScript, fonts and so on.
|
|
|
|
In order to allow you the most flexible control over Bootstrap components, this extension provides several asset bundles.
|
|
|
|
They are:
|
|
|
|
|
2021-08-03 16:22:50 +08:00
|
|
|
- [[yii\bootstrap5\BootstrapAsset|BootstrapAsset]] - contains only the main CSS files.
|
|
|
|
- [[yii\bootstrap5\BootstrapPluginAsset|BootstrapPluginAsset]] - depends on [[yii\bootstrap5\BootstrapAsset]], contains the javascript files.
|
2021-12-20 18:17:17 +08:00
|
|
|
- [[yii\bootstrap5\BootstrapIconAsset|BootstrapIconAsset]] - contains Bootstrap icons.
|
2021-07-09 17:53:24 +08:00
|
|
|
|
|
|
|
Particular application needs may require different bundle (or bundle combination) usage.
|
2021-08-03 16:22:50 +08:00
|
|
|
If you only need CSS styles, [[yii\bootstrap5\BootstrapAsset]] will be enough for you. However, if
|
|
|
|
you intend to use Bootstrap JavaScript, you will need to register [[yii\bootstrap5\BootstrapPluginAsset]]
|
2021-12-20 18:17:17 +08:00
|
|
|
as well. If you'd like to use the Bootstrap icons, you'll need to add `twbs/bootstrap-icons` package to your
|
|
|
|
`composer.json` and register [[yii\bootstrap5\BootstrapIconAsset]] in your application.
|
2021-07-09 17:53:24 +08:00
|
|
|
|
2021-08-03 16:22:50 +08:00
|
|
|
> Tip: most of the widgets register [[yii\bootstrap5\BootstrapPluginAsset]] automatically.
|