PHPackages                             kartik-v/yii2-nav-x - 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. kartik-v/yii2-nav-x

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

kartik-v/yii2-nav-x
===================

An extended bootstrap Nav widget for Yii 2 with submenu drilldown.

v1.2.5(4y ago)27564.8k↓24%4[1 PRs](https://github.com/kartik-v/yii2-nav-x/pulls)6BSD-3-ClausePHP

Since Oct 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kartik-v/yii2-nav-x)[ Packagist](https://packagist.org/packages/kartik-v/yii2-nav-x)[ Docs](https://github.com/kartik-v/yii2-nav-x)[ RSS](/packages/kartik-v-yii2-nav-x/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (6)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-nav-x ---

[![Donate](https://camo.githubusercontent.com/0336bc43d88554a3f2d6c74dddf312bc2c65c2eacca70d83ae40f5567098d00e/68747470733a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal") [![kartikv](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/kartikv "Buy me a coffee")
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-nav-x--------------)

[![Stable Version](https://camo.githubusercontent.com/c9ecf63b0ca56fd5671dbc38da039313ae3e120a719539e97813542fabe50e30/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-nav-x)[![Unstable Version](https://camo.githubusercontent.com/0ccac95cacd2ece546a1d9a427c429c30bc5acfc65b1998a05da8c10a10fd1c8/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-nav-x)[![License](https://camo.githubusercontent.com/abbe798ccf96e814f03ebc7550770f6c302722d1eb3f2abee39269116b5508dd/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-nav-x)[![Total Downloads](https://camo.githubusercontent.com/18cdd7388d7ddceb71fb10aff75b1ebb02f69398e90fb307d494a030f0721eb7/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-nav-x)[![Monthly Downloads](https://camo.githubusercontent.com/df2374d918270580656ff81d328285bce1db5a3de24b347869863ec8b77460ba/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-nav-x)[![Daily Downloads](https://camo.githubusercontent.com/d8b96c0254f4f92696d467df622affed9366127dfa57773b0f29e297b1fef5b1/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6e61762d782f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-nav-x)

An extended bootstrap Nav widget for Yii Framework 2 with submenu drilldown. This widget extends the `\yii\bootstrap\Nav` widget for Bootstrap 3.x and `\yii\bootstrap4\Nav` widget for Bootstrap 4.x `\yii\bootstrap5\Nav` widget for Bootstrap 5.x with some additional controls and adding the CSS Styles for enabling a submenu drilldown. The dropdown menu style is optimized for both desktop and mobile devices. The drilldown is triggered on `active` instead of `hover` so that it works equally well on mobile devices. The extension uses the one of the following Dropdown Class extensions by default for rendering dropdown navigation, but this can be overridden:

- `\kartik\dropdown\DropdownX` for Bootstrap 3.x
- `\kartik\bs4dropdown\Dropdown` for Bootstrap 4.x
- `\kartik\bs5dropdown\Dropdown` for Bootstrap 5.x

### Demo

[](#demo)

You can see detailed [documentation](http://demos.krajee.com/nav-x) on usage of the extension.

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

[](#installation)

Install the dependencies depending on the Bootstrap version used in your app:

1. For Bootstrap 3.x install `kartik-v/yii2-dropdown-x`

```
$ php composer.phar require kartik-v/yii2-dropdown-x "@dev"

```

2. For Bootstrap 4.x install `kartik-v/yii2-bootstrap4-dropdown`

```
$ php composer.phar require kartik-v/yii2-bootstrap4-dropdown "@dev"

```

3. For Bootstrap 5.x install `kartik-v/yii2-bootstrap5-dropdown`

```
$ php composer.phar require kartik-v/yii2-bootstrap5-dropdown "@dev"

```

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

> NOTE: Check the [composer.json](https://github.com/kartik-v/yii2-nav-x/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

Either run

```
$ php composer.phar require kartik-v/yii2-nav-x "@dev"

```

or add

```
"kartik-v/yii2-nav-x": "@dev"

```

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

Usage
-----

[](#usage)

### NavX

[](#navx)

```
use kartik\nav\NavX;
echo NavX::widget([
    'options' => ['class' => 'nav nav-pills'],
    'items' => [
        ['label' => 'Action', 'url' => '#'],
        ['label' => 'Submenu', 'items' => [
            ['label' => 'Action', 'url' => '#'],
            ['label' => 'Another action', 'url' => '#'],
            ['label' => 'Something else here', 'url' => '#'],
        ]],
        ['label' => 'Something else here', 'url' => '#'],
        '',
        ['label' => 'Separated link', 'url' => '#'],
    ],
    'encodeLabels' => false
]);
```

License
-------

[](#license)

**yii2-nav-x** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 81.1% 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 ~369 days

Recently: every ~408 days

Total

8

Last Release

1658d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3592619?v=4)[Kartik Visweswaran](/maintainers/kartik-v)[@kartik-v](https://github.com/kartik-v)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (30 commits)")[![PowerGamer1](https://avatars.githubusercontent.com/u/8275897?v=4)](https://github.com/PowerGamer1 "PowerGamer1 (7 commits)")

---

Tags

Contextmenuyii2extensionwidgetmouseclick

### Embed Badge

![Health badge](/badges/kartik-v-yii2-nav-x/health.svg)

```
[![Health](https://phpackages.com/badges/kartik-v-yii2-nav-x/health.svg)](https://phpackages.com/packages/kartik-v-yii2-nav-x)
```

###  Alternatives

[kartik-v/yii2-dropdown-x

An extended bootstrap 3.x dropdown widget for Yii 2 with submenu drilldown.

16842.3k6](/packages/kartik-v-yii2-dropdown-x)[kartik-v/yii2-grid

Yii 2 GridView on steroids. Various enhancements and utilities for the Yii 2.0 GridView widget.

5576.6M179](/packages/kartik-v-yii2-grid)[kartik-v/yii2-widget-sidenav

An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)

364.0M8](/packages/kartik-v-yii2-widget-sidenav)[kartik-v/yii2-widget-datetimepicker

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

1036.5M47](/packages/kartik-v-yii2-widget-datetimepicker)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

454.8M9](/packages/kartik-v-yii2-widget-typeahead)[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)

PHPackages © 2026

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