PHPackages                             itbeauftragter/yii2-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. itbeauftragter/yii2-bootstrap

ActiveYii2-extension[Framework](/categories/framework)

itbeauftragter/yii2-bootstrap
=============================

Bootstrap Asset Bundle extension for Yii2 framework

5.1.3(4y ago)07MITPHPPHP &gt;=5.4.0

Since Sep 29Pushed 4y agoCompare

[ Source](https://github.com/ITBeauftragter/yii2-bootstrap)[ Packagist](https://packagist.org/packages/itbeauftragter/yii2-bootstrap)[ RSS](/packages/itbeauftragter-yii2-bootstrap/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (3)Versions (7)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft) [ ![](https://camo.githubusercontent.com/eada7452c242d40867df5f978be99825c9ead3a8/68747470733a2f2f76342d616c7068612e676574626f6f7473747261702e636f6d2f6173736574732f6272616e642f626f6f7473747261702d736f6c69642e737667) ](https://getbootstrap.com/)

Bootstrap Extension for Yii 2
==============================

[](#bootstrap-extension-for-yii-2-)

Bootstrap Asset Bundle extension for Yii2 framework with official Composer

[![Latest Stable Version](https://camo.githubusercontent.com/c40147fd6b9bb2927ddfa8c841d45beea0c035b18f7a49fe52bf05ca0f0dc2df/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f796969322d626f6f7473747261702f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/yii2-bootstrap)[![Latest Unstable Version](https://camo.githubusercontent.com/d908954464f1654268d6876c3b6bd8ca6bd1568d2d9fc889e6cfeff279537856/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f796969322d626f6f7473747261702f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/yii2-bootstrap)[![License](https://camo.githubusercontent.com/7e33c29fdca2737bbede7671df7190d89ea4c4410f11a4991a0fd17fad260e77/68747470733a2f2f706f7365722e707567782e6f72672f79696461732f796969322d626f6f7473747261702f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/yidas/yii2-bootstrap)

This is the [Bootstrap](https://getbootstrap.com/) extension for [Yii framework 2.0](http://www.yiiframework.com/). It encapsulates [Bootstrap](https://github.com/twbs/bootstrap) distribution assets and thus makes using Bootstrap in Yii applications extremely easy.

FEATURES
--------

[](#features)

- ***No Bower**, Composer installation only*
- ***CDN &amp; Official** assets source provided*
- ***Version Controll** refers to jQuery*

---

REQUIREMENTS
------------

[](#requirements)

This library requires the following:

- PHP 5.4.0+
- yiisoft/yii2 2.0.6+
- twbs/bootstrap 4.0+
- yidas/yii2-jquery 2.0+

---

INSTALLATION
------------

[](#installation)

The preferred install way is through [Composer](http://getcomposer.org/download/):

```
composer require yidas/yii2-bootstrap

```

Version options refered Bootstrap release:

```
composer require yidas/yii2-bootstrap ~3.0
composer require yidas/yii2-bootstrap ~4.0

```

Or you could edit `composer.json` with adding package in require section then run `composer update`.

```
"yidas/yii2-bootstrap": "*"

```

---

CONFIGURATION
-------------

[](#configuration)

Register or depend Asset into your application:

```
yidas\yii\bootstrap\BootstrapAsset
```

For example, to register Bootstrap assets in view :

```
\yidas\yii\bootstrap\BootstrapAsset::register($this);
```

Or as dependency in your app asset bundle :

```
namespace app\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yidas\yii\bootstrap\BootstrapAsset'
    ];
}
```

### CDN Asset Mode

[](#cdn-asset-mode)

You could switch Asset to use CDN distribution by configuring `config` file:

```
'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\bootstrap\BootstrapAsset' => [
                'cdn' => true,
                // 'cdnVersion' => '4.1.3',
            ],
        ],
    ],
],
```

#### Specify a CDN source

[](#specify-a-cdn-source)

You could also specify CDN source you like:

```
'assetManager' => [
    'bundles' => [
        'yidas\yii\fontawesome\FontawesomeAsset' => [
            'cdn' => true,
            'cdnCSS' => ['https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css'],
            'cdnJS' => ['https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js'],
        ],
    ],
],
```

### jQuery Dependency

[](#jquery-dependency)

This Bootstrap extension required [jQuery](https://github.com/jquery/jquery) Javascript library, you could set `yii\web\JqueryAsset` in `$depends`, or simplly depends a asset included your own jQuery JS file whether is CDN or not.

```
    public $depends = [
        //'yii\web\JqueryAsset',
        'yidas\yii\jquery\JqueryAsset',
        'yidas\yii\bootstrap\BootstrapAsset'
    ];
```

Another way, you could easliy enable jquery dependency by setting `jquery` property form `BootstrapAsset`:

```
'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\bootstrap\BootstrapAsset' => [
                'jquery' => true,
                // 'cdn' => true,
            ],
            'yidas\yii\jquery\JqueryAsset' => [
                // 'cdn' => true,
            ],
        ],
    ],
],
```

---

USAGE
-----

[](#usage)

### Version Control

[](#version-control)

#### Update dependent packages

[](#update-dependent-packages)

```
composer update yidas/yii2-bootstrap

```

#### Update newest Bootstrap version

[](#update-newest-bootstrap-version)

```
composer update twbs/bootstrap

```

#### Specify a Bootstrap version

[](#specify-a-bootstrap-version)

```
composer require twbs/bootstrap 4.1.3

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~215 days

Recently: every ~269 days

Total

6

Last Release

1710d ago

Major Versions

v3.x-dev → 5.1.12021-09-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/468a353786f72a512dd34070d2a554fc32d714ba22f86dc2e947c57c8d3d6f1a?d=identicon)[ITBeauftragter](/maintainers/ITBeauftragter)

---

Top Contributors

[![ITBeauftragter](https://avatars.githubusercontent.com/u/46814233?v=4)](https://github.com/ITBeauftragter "ITBeauftragter (6 commits)")[![yidas](https://avatars.githubusercontent.com/u/12604195?v=4)](https://github.com/yidas "yidas (5 commits)")

---

Tags

yii2yiibootstrapassetasset bundle

### Embed Badge

![Health badge](/badges/itbeauftragter-yii2-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/itbeauftragter-yii2-bootstrap/health.svg)](https://phpackages.com/packages/itbeauftragter-yii2-bootstrap)
```

###  Alternatives

[yiisoft/yii2-bootstrap

The Twitter Bootstrap extension for the Yii framework

19819.6M1.0k](/packages/yiisoft-yii2-bootstrap)[yiisoft/yii2-bootstrap5

The Twitter Bootstrap v5 extension for the Yii framework

661.4M121](/packages/yiisoft-yii2-bootstrap5)[crisu83/yiistrap

Twitter Bootstrap for the Yii PHP framework.

286173.3k19](/packages/crisu83-yiistrap)[deyraka/yii2-material-dashboard

Material Dashboard Theme for Yii 2.0

121.9k](/packages/deyraka-yii2-material-dashboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
