PHPackages                             execut/yii2-widget-bootstraptreeview - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. execut/yii2-widget-bootstraptreeview

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

execut/yii2-widget-bootstraptreeview
====================================

Bootstrap Tree View widget wrapper for yii2

1.4.1(4y ago)46170.2k↓21.8%24[1 issues](https://github.com/execut/yii2-widget-bootstraptreeview/issues)Apache-2.0PHP

Since Nov 23Pushed 4y ago7 watchersCompare

[ Source](https://github.com/execut/yii2-widget-bootstraptreeview)[ Packagist](https://packagist.org/packages/execut/yii2-widget-bootstraptreeview)[ Docs](https://github.com/execut/yii2-widget-bootstraptreeview)[ RSS](/packages/execut-yii2-widget-bootstraptreeview/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

Bootstrap Tree View widget wrapper for yii2
===========================================

[](#bootstrap-tree-view-widget-wrapper-for-yii2)

[Widget page](https://github.com/patternfly/patternfly-bootstrap-treeview)

[![Bootstrap Tree View Default](https://camo.githubusercontent.com/9cb196be19eabb7c9ea1585b3956d57552126ffb9d0b7dcf9154eebe7f787f77/68747470733a2f2f7261772e6769746875622e636f6d2f6a6f6e6d696c65732f626f6f7473747261702d74726565766965772f6d61737465722f73637265656e73686f742f64656661756c742e504e47)](https://camo.githubusercontent.com/9cb196be19eabb7c9ea1585b3956d57552126ffb9d0b7dcf9154eebe7f787f77/68747470733a2f2f7261772e6769746875622e636f6d2f6a6f6e6d696c65732f626f6f7473747261702d74726565766965772f6d61737465722f73637265656e73686f742f64656661756c742e504e47)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

### Install

[](#install)

Either run

```
$ php composer.phar require execut/yii2-widget-bootstraptreeview "dev-master"

```

or add

```
"execut/yii2-widget-bootstraptreeview": "dev-master"

```

to the `require` section of your `composer.json` file.

Simple example
--------------

[](#simple-example)

```
use execut\widget\TreeView;
use yii\web\JsExpression;

$data = [
    [
        'text' => 'Parent 1',
        'nodes' => [
            [
                'text' => 'Child 1',
                'nodes' => [
                    [
                        'text' => 'Grandchild 1'
                    ],
                    [
                        'text' => 'Grandchild 2'
                    ]
                ]
            ],
            [
                'text' => 'Child 2',
            ]
        ],
    ],
    [
        'text' => 'Parent 2',
    ]
];

$onSelect = new JsExpression( $data,
    'size' => TreeView::SIZE_SMALL,
    'header' => 'Categories',
    'searchOptions' => [
        'inputOptions' => [
            'placeholder' => 'Search category...'
        ],
        'clearButtonOptions' => [
            'title' => 'Clear',
        ],
    ],
    'clientOptions' => [
        'onNodeSelected' => $onSelect,
        'selectedBackColor' => 'rgb(40, 153, 57)',
        'borderColor' => '#fff',
    ],
]);

echo $groupsContent;
```

Pjax navigation example
-----------------------

[](#pjax-navigation-example)

```
use yii\widgets\Pjax;
use yii\web\JsExpression;
use execut\widget\TreeView;
use yii\helpers\Url;
Pjax::begin([
    'id' => 'pjax-container',
]);

echo \yii::$app->request->get('page');

Pjax::end();

$onSelect = new JsExpression( 'Parent 1',
        'href' => Url::to(['', 'page' => 'parent1']),
        'nodes' => [
            [
                'text' => 'Child 1',
                'href' => Url::to(['', 'page' => 'child1']),
                'nodes' => [
                    [
                        'text' => 'Grandchild 1',
                        'href' => Url::to(['', 'page' => 'grandchild1'])
                    ],
                    [
                        'text' => 'Grandchild 2',
                        'href' => Url::to(['', 'page' => 'grandchild2'])
                    ]
                ]
            ],
        ],
    ],
];

echo TreeView::widget([
    'data' => $items,
    'size' => TreeView::SIZE_SMALL,
    'clientOptions' => [
        'onNodeSelected' => $onSelect,
    ],
]);
```

Changing widget template
------------------------

[](#changing-widget-template)

You can redefine widget template via template option:

```
echo TreeView::widget([
    ...
    'template => TreeView::TEMPLATE_SIMPLE,
    //'template => TreeView::TEMPLATE_ADVANCED //by default
    ...
]);
```

Supported template parts:

KeyDescription{header}'header' configuration widget param{search}Search input{tree}Bootstrap TreeView widget contentLicense
-------

[](#license)

**yii2-widget-bootstraptreeview** is released under the Apache License Version 2.0. See the bundled `LICENSE.md` for details.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 85.4% 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 ~170 days

Recently: every ~160 days

Total

13

Last Release

1785d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ffb982747c04d8d93e2db3f8d90e44864c7c2a21a4c3d00ffbe66325f3f91c4?d=identicon)[execut](/maintainers/execut)

---

Top Contributors

[![execut](https://avatars.githubusercontent.com/u/2357407?v=4)](https://github.com/execut "execut (35 commits)")[![nerburish](https://avatars.githubusercontent.com/u/5610788?v=4)](https://github.com/nerburish "nerburish (3 commits)")[![Disassem](https://avatars.githubusercontent.com/u/11461847?v=4)](https://github.com/Disassem "Disassem (1 commits)")[![lengnuan-v](https://avatars.githubusercontent.com/u/45681358?v=4)](https://github.com/lengnuan-v "lengnuan-v (1 commits)")[![Taroxx](https://avatars.githubusercontent.com/u/9588339?v=4)](https://github.com/Taroxx "Taroxx (1 commits)")

---

Tags

pluginjquerytreeyii2extensionbootstrapforminput

### Embed Badge

![Health badge](/badges/execut-yii2-widget-bootstraptreeview/health.svg)

```
[![Health](https://phpackages.com/badges/execut-yii2-widget-bootstraptreeview/health.svg)](https://phpackages.com/packages/execut-yii2-widget-bootstraptreeview)
```

###  Alternatives

[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

184.1M6](/packages/kartik-v-yii2-widget-touchspin)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[kartik-v/yii2-widget-rangeinput

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

193.9M3](/packages/kartik-v-yii2-widget-rangeinput)

PHPackages © 2026

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