PHPackages                             yiisoft/yii2-jquery - 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. yiisoft/yii2-jquery

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

yiisoft/yii2-jquery
===================

jQuery integration layer for Yii2 asset bundles, client validation scripts, and widget client scripts.

31.3kPHPCI passing

Since Apr 13Pushed 1mo agoCompare

[ Source](https://github.com/yiisoft/yii2-jquery)[ Packagist](https://packagist.org/packages/yiisoft/yii2-jquery)[ RSS](/packages/yiisoft-yii2-jquery/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (8)Used By (0)

    ![Yii Framework](https://camo.githubusercontent.com/cc75562bca6e54e98046e4fb187ef8d96c997a8f31c6f4d2f6ed0c816413b47a/68747470733a2f2f7777772e7969696672616d65776f726b2e636f6d2f696d6167652f7969695f6c6f676f5f6c696768742e737667)

jQuery Integration Extension for Yii2
=====================================

[](#jquery-integration-extension-for-yii2)

This extension provides the optional jQuery integration layer for [Yii Framework 2.0](https://www.yiiframework.com)applications. It supplies jQuery-backed asset bundles, client-side validation scripts, and widget client scripts for every core validator, grid component, and widget that supports the client-script strategy pattern.

[![Latest Stable Version](https://camo.githubusercontent.com/3f0e66c21580f83ca5a2e0bed152c6691f46e2bbdb6397f0a720f4bef22b4e43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796969736f66742f796969322d6a71756572792e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d537461626c65266c6f676f3d7061636b6167697374)](https://packagist.org/packages/yiisoft/yii2-jquery)[![Total Downloads](https://camo.githubusercontent.com/57a50152370319816c2cfe59ea1d0153d398a63e79ecd3bd150f8175536970e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796969736f66742f796969322d6a71756572792e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/yiisoft/yii2-jquery)[![build](https://camo.githubusercontent.com/0db29fe20ee51188c6e0b2587afc5a43aa773cf2d269997646c68ae5bd5e97f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969736f66742f796969322d6a71756572792f6275696c642e796d6c3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6162656c3d4275696c64)](https://github.com/yiisoft/yii2-jquery/actions?query=workflow%3Abuild)[![codecov](https://camo.githubusercontent.com/10d0f25e3aeec300ca00ccd40ae920231f0005bd853df8bee8eca5f3bfbbfa12/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f796969736f66742f796969322d6a71756572792e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6465636f76266c6f676f436f6c6f723d7768697465266c6162656c3d436f6465636f76)](https://codecov.io/gh/yiisoft/yii2-jquery)[![Static Analysis](https://camo.githubusercontent.com/1606b858f7ca57cec8db3cd6ac6fae44094603194c861926ea0c97b79dcbe3e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f796969736f66742f796969322d6a71756572792f7374617469632e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d537461746963)](https://github.com/yiisoft/yii2-jquery/actions/workflows/static.yml)

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

[](#installation)

Important

- The minimum required [PHP](https://www.php.net/) version is PHP `8.3`.
- Requires [`yiisoft/yii2`](https://github.com/yiisoft/yii2) `22.x`.

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

Either run

```
composer require --prefer-dist yiisoft/yii2-jquery:~1.0.0

```

or add

```
"yiisoft/yii2-jquery": "~1.0.0"

```

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

Usage
-----

[](#usage)

Once the extension is installed, register the bootstrap class in your application configuration:

```
return [
    'bootstrap' => [
        \yii\jquery\Bootstrap::class,
    ],
    // ...
];
```

The `Bootstrap` class configures the DI container with jQuery-based `$clientScript` defaults for every core validator, grid component, and widget that supports the client-script strategy pattern. No further configuration is required.

Overriding a single validator
-----------------------------

[](#overriding-a-single-validator)

You can override the client-script implementation on a per-rule basis by passing the `clientScript` key in the rule definition:

```
public function rules(): array
{
    return [
        [
            'email',
            'required',
            'clientScript' => ['class' => MyCustomRequiredClientScript::class],
        ],
    ];
}
```

Quality code
------------

[](#quality-code)

[![PHPStan Level](https://camo.githubusercontent.com/795ff8098c6acae857d14a54f4bc15bc9616930c34ee14fb56d2c79bd1309053/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253230352d3446354439352e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/yii2-framework/jquery/actions/workflows/static.yml)[![StyleCI](https://camo.githubusercontent.com/e8c949a07561fd257373f0d92870e3605c859ccca4b75b25fa05a2d01eee6d25/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374796c6543492d5061737365642d3434434331312e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7374796c656369266c6f676f436f6c6f723d7768697465)](https://github.styleci.io/repos/1053295485?branch=main)

Documentation
-------------

[](#documentation)

- [Installation Guide](docs/guide/installation.md)
- [Configuration Reference](docs/guide/configuration.md)
- [Usage Examples](docs/guide/usage.md)
- [Testing Guide](docs/guide/testing.md)

Support the project
-------------------

[](#support-the-project)

[![Open Collective](https://camo.githubusercontent.com/ad8d82ae4dbf7869403317d29b3ab412509ad638d6b58d8855ec18853b5ab5ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e253230436f6c6c6563746976652d73706f6e736f722d3765616466313f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e253230636f6c6c656374697665266c6f676f436f6c6f723d376561646631266c6162656c436f6c6f723d353535353535)](https://opencollective.com/yiisoft)

Follow updates
--------------

[](#follow-updates)

[![Official website](https://camo.githubusercontent.com/289983c1dde520aac09b2e2c1456588e33a6551e5353146255ef287aef12483e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d796969)](https://www.yiiframework.com/)[![Follow on X](https://camo.githubusercontent.com/332c1b1e043dfb940b95825f7863dc473f6924ddacdd6738cbbbba08f49e1862/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d466f6c6c6f772532306f6e253230582d3144413146322e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d78266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d303030303030)](https://x.com/yiiframework)[![Telegram](https://camo.githubusercontent.com/011b161ebda90a674c45717c4bf9147979afb1ec6900246ef70ed6ba2bfc55b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74656c656772616d2d6a6f696e2d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d74656c656772616d)](https://t.me/yii_framework_in_english)[![Slack](https://camo.githubusercontent.com/73a139b0b78939a369c6b99ada6184607d59e6d0c0c216d44c4012a1b3cd06ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736c61636b2d6a6f696e2d3144413146323f7374796c653d666f722d7468652d6261646765266c6f676f3d736c61636b)](https://yiiframework.com/go/slack)

License
-------

[](#license)

[![License](https://camo.githubusercontent.com/680c8d62ba2d5a71d7099b6e81114fb0b22d99086c121fd178e1149afc669d44/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4253442d2d332d2d436c617573652d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e736f75726365696e6974696174697665266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](LICENSE)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance61

Regular maintenance activity

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/261a6249c6f605f3956a2fae40fbb813f6b2e1e6f2bf806180c851a965426e54?d=identicon)[cebe](/maintainers/cebe)

![](https://www.gravatar.com/avatar/fc29e4e7068a00fe9b9db37b8aadda1db6020adcacef810461e47b99c2b150e6?d=identicon)[samdark](/maintainers/samdark)

![](https://www.gravatar.com/avatar/ccb75e3312d6bd454ea445ea308139fd185a4ca906ca5df21cc66e6a35de25a3?d=identicon)[SilverFire](/maintainers/SilverFire)

![](https://www.gravatar.com/avatar/854af1889dd7384243cff0bf0fde23463f76058b499b15c740f02e7033ec7ce6?d=identicon)[klimov-paul](/maintainers/klimov-paul)

![](https://www.gravatar.com/avatar/524d2b46690f41fce7188d369488a35e7624e6c5a264d82aacd08548bfd156ab?d=identicon)[terabytesoftw](/maintainers/terabytesoftw)

---

Top Contributors

[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (49 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (16 commits)")[![machour](https://avatars.githubusercontent.com/u/304450?v=4)](https://github.com/machour "machour (14 commits)")[![devanych](https://avatars.githubusercontent.com/u/20116244?v=4)](https://github.com/devanych "devanych (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (4 commits)")[![hiqsol](https://avatars.githubusercontent.com/u/11820365?v=4)](https://github.com/hiqsol "hiqsol (4 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (3 commits)")[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (3 commits)")[![rustamwin](https://avatars.githubusercontent.com/u/16498265?v=4)](https://github.com/rustamwin "rustamwin (2 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (1 commits)")[![Fantom409](https://avatars.githubusercontent.com/u/14968877?v=4)](https://github.com/Fantom409 "Fantom409 (1 commits)")

---

Tags

assetsjqueryvalidationwidgetsyii2

### Embed Badge

![Health badge](/badges/yiisoft-yii2-jquery/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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