PHPackages                             kartik-v/yii2-krajee-base - 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. kartik-v/yii2-krajee-base

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

kartik-v/yii2-krajee-base
=========================

Base library and foundation components for all Yii2 Krajee extensions.

v3.0.5(3y ago)6811.6M↓11.4%6320BSD-3-ClausePHP

Since Nov 9Pushed 3y ago5 watchersCompare

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

READMEChangelog (10)DependenciesVersions (53)Used By (20)

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

 [![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-krajee-base------------------)

[![Stable Version](https://camo.githubusercontent.com/e10c29f2017f45f4b33ddc4d496e6916e36e7f3fafff3bf7741c81d29dbdb92f/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-krajee-base)[![Unstable Version](https://camo.githubusercontent.com/5ae717d194f34ac798e1edcb06bb47cbefcde463eeac97ad5979788c6cba6f08/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-krajee-base)[![License](https://camo.githubusercontent.com/334a9a935c9c96664e21638746cf9b7d99f93ea76848edbcc04d067bb13e1575/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-krajee-base)[![Total Downloads](https://camo.githubusercontent.com/0f90a4d85c33c397f4721d267d7573c98104c92e699c43b79f122e3ff6f549d0/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-krajee-base)[![Monthly Downloads](https://camo.githubusercontent.com/a327732a7920e37e9611b607723379746d58342daa8848ca5be28bd2a239421d/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-krajee-base)[![Daily Downloads](https://camo.githubusercontent.com/fb768b9ec185af83ba9209c61d34cfc59534285e7694cb66d304af6a5c24e5ce/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d6b72616a65652d626173652f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-krajee-base)

This is a base library with set of foundation classes and components used by all [Yii2 extensions by Krajee](http://demos.krajee.com). One can use this base library during creation of one's own extensions if needed.

> NOTE: This extension depends on the [yiisoft/yii2-bootstrap](https://github.com/yiisoft/yii2-bootstrap) and/or [yiisoft/yii2-bootstrap4](https://github.com/yiisoft/yii2-bootstrap4) extensions. Check the [composer.json](https://github.com/kartik-v/yii2-krajee-base/blob/master/composer.json) for this extension's requirements and dependencies.

Why this extension?
-------------------

[](#why-this-extension)

To ensure a leaner code base / foundation component for use in all Krajee extensions (e.g. yii2-widgets, yii2-datecontrol, yii2-grid, yii2-dynagrid etc.). This should allow most developers to plug and play components only they need, without needing the complete suite of widgets. For example, this mitigates [this issue](https://github.com/kartik-v/yii2-grid/issues/123).

Release Changes
---------------

[](#release-changes)

> NOTE: Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-krajee-base/blob/master/CHANGE.md) for details on changes to various releases.

Extension Classes
-----------------

[](#extension-classes)

### [Module](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/Module.php)

[](#module)

Extends [Yii Module](https://github.com/yiisoft/yii2/blob/master/framework/base/Module.php) class for Krajee's Yii2 widgets and usage with translation properties enabled.

### [Widget](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/Widget.php)

[](#widget)

Extends [Yii Widget](https://github.com/yiisoft/yii2/blob/master/framework/base/Widget.php) class for Krajee's Yii2 widgets and usage with bootstrap CSS framework.

### [InputWidget](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/InputWidget.php)

[](#inputwidget)

Extends [Yii InputWidget](https://github.com/yiisoft/yii2/blob/master/framework/widgets/InputWidget.php) class for Krajee's Yii2 widgets and usage with bootstrap CSS framework. With release v1.3.0, the Input widget automatically now attaches the following HTML5 data attribute for each input that registers jQuery plugins via `registerPlugin` method:

- `data-krajee-{name}` the client options of the plugin. The tag `{name}` will be replaced with the registered jQuery plugin name (e.g. `select2`, `typeahead` etc.).

### [TranslationTrait](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/TranslationTrait.php)

[](#translationtrait)

A trait for handling translation functionality using Yii's i18n components.

### [BootstrapInterface](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/BootstrapInterface.php)

[](#bootstrapinterface)

The interface that defines the constants and method signatures for bootstrap 3.x, 4.x, and 5.x versions that will be implemented in all classes that use `BootstrapTrait`.

### [BootstrapTrait](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/BootstrapTrait.php)

[](#bootstraptrait)

A trait for bootstrap 3.x, 4.x, and 5.x version parsing functionality for Krajee extensions (the class using this trait must implement `BootstrapInterface`).

### [AddonTrait](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/AddonTrait.php)

[](#addontrait)

A trait for rendering bootstrap 3.x, 4.x, or 5.x input group addons.

### [WidgetTrait](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/WidgetTrait.php)

[](#widgettrait)

A trait for Krajee widgets including prebuilt methods for plugin registration.

### [AssetBundle](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/AssetBundle.php)

[](#assetbundle)

Extends [Yii AssetBundle](https://github.com/yiisoft/yii2/blob/master/framework/web/AssetBundle.php) class for Krajee's Yii2 widgets with enhancements for using minimized CSS and JS based on debug mode.

### [PluginAssetBundle](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/PluginAssetBundle.php)

[](#pluginassetbundle)

Extension of the above [AssetBundle](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/AssetBundle.php) to include dependency on Bootstrap assets and javascript plugins.

### [AnimateAsset](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/AnimateAsset.php)

[](#animateasset)

An asset bundle for loading various CSS3 animations and effects.

### [Html5Input](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/Html5Input.php)

[](#html5input)

A modified input widget for rendering HTML5 inputs with bootstrap styling and input group addons for Krajee's Yii 2 extensions.

### [Config](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/Config.php)

[](#config)

A global configuration and validation helper class for usage across Krajee's Yii 2 extensions.

### [Lib](https://github.com/kartik-v/yii2-krajee-base/blob/master/src/Lib.php)

[](#lib)

A base class for modified standard PHP internal functions. It is specifically built to address warnings in PHP v8.1 and above due to null arguments passed to PHP internal functions which results in deprecation errors in PHP v8.1 and beyond.

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

[](#installation)

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

> Note: 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-krajee-base "dev-master"

```

or add

```
"kartik-v/yii2-krajee-base": "dev-master"

```

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

License
-------

[](#license)

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

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity62

Solid adoption and visibility

Community41

Growing community involvement

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 91.9% 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 ~54 days

Recently: every ~67 days

Total

52

Last Release

1447d ago

Major Versions

v1.9.9 → v2.0.02018-10-09

v2.0.6 → v3.0.02021-09-01

### 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 (193 commits)")[![Hrumpa](https://avatars.githubusercontent.com/u/662195?v=4)](https://github.com/Hrumpa "Hrumpa (4 commits)")[![uldisn](https://avatars.githubusercontent.com/u/3525344?v=4)](https://github.com/uldisn "uldisn (2 commits)")[![Arnaud-G1](https://avatars.githubusercontent.com/u/8536657?v=4)](https://github.com/Arnaud-G1 "Arnaud-G1 (2 commits)")[![freezy-sk](https://avatars.githubusercontent.com/u/661637?v=4)](https://github.com/freezy-sk "freezy-sk (1 commits)")[![mazurva](https://avatars.githubusercontent.com/u/1152567?v=4)](https://github.com/mazurva "mazurva (1 commits)")[![pauchai](https://avatars.githubusercontent.com/u/91274804?v=4)](https://github.com/pauchai "pauchai (1 commits)")[![thenotsoft](https://avatars.githubusercontent.com/u/44147615?v=4)](https://github.com/thenotsoft "thenotsoft (1 commits)")[![ajmedway](https://avatars.githubusercontent.com/u/1861604?v=4)](https://github.com/ajmedway "ajmedway (1 commits)")[![ZhandosKz](https://avatars.githubusercontent.com/u/2029373?v=4)](https://github.com/ZhandosKz "ZhandosKz (1 commits)")[![bethrezen](https://avatars.githubusercontent.com/u/260284?v=4)](https://github.com/bethrezen "bethrezen (1 commits)")[![cronfy](https://avatars.githubusercontent.com/u/762954?v=4)](https://github.com/cronfy "cronfy (1 commits)")[![Enrica-r](https://avatars.githubusercontent.com/u/2463365?v=4)](https://github.com/Enrica-r "Enrica-r (1 commits)")

---

Tags

yii2extensionwidgetfoundationbasekrajee

### Embed Badge

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

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

###  Alternatives

[miloschuman/yii2-highcharts-widget

Highcharts widget for Yii 2 Framework.

1761.5M14](/packages/miloschuman-yii2-highcharts-widget)[thiagotalma/yii2-fullcalendar

Widget for Yii Framework 2.0 to use FullCalendar

1777.7k](/packages/thiagotalma-yii2-fullcalendar)

PHPackages © 2026

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