PHPackages                             xbazilio/yii2-jswidget - 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. xbazilio/yii2-jswidget

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xbazilio/yii2-jswidget
======================

Outputs javascript code using yii\\web\\View::registerJs().

1.0.0(11y ago)019MITPHP

Since Dec 5Pushed 11y ago1 watchersCompare

[ Source](https://github.com/xBazilio/yii2-jswidget)[ Packagist](https://packagist.org/packages/xbazilio/yii2-jswidget)[ RSS](/packages/xbazilio-yii2-jswidget/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

JSWidget for Yii2
=================

[](#jswidget-for-yii2)

\#What is this?

A simple widget to wrap your javascript code and output it in specified position of the rendered page.

\#Installation

```
composer require "xbazilio/yii2-jswidget":"1.0.0"

```

\#Usage

By default it outputs code in the `yii\web\View::POS_END`. Pass `position` parameter if you want to change this behaviour.

```

console.log('test');

```

If there are two widgets with the same id, the later will take precedence and overwrite the former

```

 'test']); ?>

console.log('test');

 'test']); ?>

console.log('test overwritten');

```

Only 'test overwritten' will be logged.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4182d ago

### Community

---

Top Contributors

[![xBazilio](https://avatars.githubusercontent.com/u/4119114?v=4)](https://github.com/xBazilio "xBazilio (13 commits)")

### Embed Badge

![Health badge](/badges/xbazilio-yii2-jswidget/health.svg)

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

###  Alternatives

[bazilio/yii2-stubs-generator

Yii2 component stubs generator for Yii::$app

146720.4k1](/packages/bazilio-yii2-stubs-generator)[marabesi/laration

Easy package to list all variables in a Laravel application

4738.7k](/packages/marabesi-laration)[infinety-es/nova-menu-builder

Menu Builder Tool for Laravel Nova.

6514.8k](/packages/infinety-es-nova-menu-builder)

PHPackages © 2026

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