yii2-nav-x An extended bootstrap Nav widget for Yii 2 with submenu drilldown.

  1. Demo
  2. Requirements
  3. Installation
  4. Usage
  5. Report
  6. License
  7. Resources

An extended bootstrap Nav widget for Yii Framework 2 with submenu drilldown. This widget extends the \yii\bootstrap\Nav widget 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 \kartik\dropdown\NavX extension by default for rendering dropdown navigation, but this can be overridden.

Note: This extension depends on the kartik-v/yii2-widgets extension which in turn depends on the yiisoft/yii2-bootstrap extension. Check the composer.json for this extension's requirements and dependencies. Note: Yii 2 framework is still in active development, and until a fully stable Yii2 release, your core yii2-bootstrap packages (and its dependencies) may be updated when you install or update this extension. You may need to lock your composer package versions for your specific app, and test for extension break if you do not wish to auto update dependencies.


You can see detailed documentation with examples on usage of the extension.


  • Yii 2.0 (*)
  • PHP 5.4
  • Bootstrap 3.0

NOTE: This extension mandatorily requires Yii Framework 2.


The preferred way to install this extension is through composer.

Either run:

$ php composer.phar require kartik-v/yii2-nav-x "*"

or add:

"kartik-v/yii2-nav-x": "*"

to the require section of your composer.json file.


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' => '#'],
        '<li class="divider"></li>',
        ['label' => 'Separated link', 'url' => '#'],
    'encodeLabels' => false



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


0 2
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: Kartik V
Created on: May 10, 2014
Last updated: 9 years ago

Related Extensions