PHPackages                             ricgrangeia/yii2\_widget\_js - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ricgrangeia/yii2\_widget\_js

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

ricgrangeia/yii2\_widget\_js
============================

Javascript Inside Views for Yii2

v1.0.4(2y ago)0485MITPHPPHP &gt;=7.4

Since Sep 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ricgrangeia/yii2_widget_js)[ Packagist](https://packagist.org/packages/ricgrangeia/yii2_widget_js)[ RSS](/packages/ricgrangeia-yii2-widget-js/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (6)Used By (0)

Javascript Inside Views for Yii2
================================

[](#javascript-inside-views-for-yii2)

`author: Ricardo Grangeia Dias `

### Installation

[](#installation)

`composer require ricgrangeia/yii2_widget_js`

### Another way to use javascript inside views

[](#another-way-to-use-javascript-inside-views)

### Usage

[](#usage)

Very simple to use, just put the code inside the begin and end methods.

```

        function myFunction() {
            alert("I am an alert box!");
        }
        myFunction();

```

Is possible to use the position parameter to change the position of the script tag.

```

        function myFunction() {
            alert("I am an alert box!");
        }
        myFunction();

```

### Previous work and credits

[](#previous-work-and-credits)

- First Author: Angel\_De\_La\_Noche
-

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Every ~0 days

Total

5

Last Release

960d ago

### Community

Maintainers

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

---

Top Contributors

[![ricgrangeia](https://avatars.githubusercontent.com/u/96277907?v=4)](https://github.com/ricgrangeia "ricgrangeia (10 commits)")

---

Tags

javascriptJSyii2extensionwidgets

### Embed Badge

![Health badge](/badges/ricgrangeia-yii2-widget-js/health.svg)

```
[![Health](https://phpackages.com/badges/ricgrangeia-yii2-widget-js/health.svg)](https://phpackages.com/packages/ricgrangeia-yii2-widget-js)
```

###  Alternatives

[jodit/yii2-jodit

Jodit - awesome WYSIWYG Editor like widget for Yii2

1621.5k](/packages/jodit-yii2-jodit)[raoul2000/yii2-bootswatch-asset

Use Bootswatch theme in your Yii application with minimum effort

2145.0k4](/packages/raoul2000-yii2-bootswatch-asset)[zxbodya/yii2-tinymce

Yii2 extension to use TinyMce with Compressor and FileManager

1732.1k3](/packages/zxbodya-yii2-tinymce)

PHPackages © 2026

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