PHPackages                             kartik-v/yii2-widget-rating - 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. kartik-v/yii2-widget-rating

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kartik-v/yii2-widget-rating
===========================

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

v1.0.5(4y ago)444.1M↓11.3%58BSD-3-ClausePHP

Since Nov 8Pushed 4y ago3 watchersCompare

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

READMEChangelog (6)Dependencies (2)Versions (7)Used By (8)

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

 [![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-widget-rating------------------)

[![Stable Version](https://camo.githubusercontent.com/cfe9d3d96d42d5bec3ff673836a0b406e275b907c21eab28583088a4dd9c702e/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-rating)[![Unstable Version](https://camo.githubusercontent.com/4703b65b9d3abb89620eedcfc7214fd5082ffde87fdd1ac1b0a13a768206bdbf/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-rating)[![License](https://camo.githubusercontent.com/d112522571f35b033a9a4a994a06a4c8e82b1c55b25d67c8359264afb50aee41/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-widget-rating)[![Total Downloads](https://camo.githubusercontent.com/f8c195113f1f3db93d8414bf363264297870a06bb3903e7a7be92c7f5646eb52/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-widget-rating)[![Monthly Downloads](https://camo.githubusercontent.com/224d9c7aed98cccf6eac10a93ea6a711d2751725b7cd36fe7e7fddbefefa246c/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-widget-rating)[![Daily Downloads](https://camo.githubusercontent.com/d730f7e87dda849df98b88911f3f698ddd75e879667534c0f5515c040f97f091/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d726174696e672f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-widget-rating)

The StarRating widget is a wrapper for the [Bootstrap Star Rating Plugin](http://plugins.krajee.com/star-rating) JQuery Plugin designed by Krajee. This plugin is a simple yet powerful JQuery star rating plugin for Bootstrap. Developed with a focus on utlizing pure CSS-3 styling to render the control.

> NOTE: This extension is a sub repo split of [yii2-widgets](https://github.com/kartik-v/yii2-widgets). The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of [yii2-widgets](http://demos.krajee.com/widgets).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-rating/blob/master/composer.json) for this extension's requirements and dependencies. 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.

To install, either run

```
$ php composer.phar require kartik-v/yii2-widget-rating "*"

```

or add

```
"kartik-v/yii2-widget-rating": "*"

```

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

Latest Release
--------------

[](#latest-release)

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

Demo
----

[](#demo)

You can refer detailed [documentation and demos](http://demos.krajee.com/widget-details/star-rating) on usage of the extension.

Usage
-----

[](#usage)

```
use kartik\rating\StarRating;

// Usage with ActiveForm and model
echo $form->field($model, 'rating')->widget(StarRating::classname(), [
    'pluginOptions' => ['size'=>'lg']
]);

// With model & without ActiveForm
echo StarRating::widget([
    'name' => 'rating_1',
    'pluginOptions' => ['disabled'=>true, 'showClear'=>false]
]);
```

License
-------

[](#license)

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

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity67

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

Every ~513 days

Recently: every ~534 days

Total

6

Last Release

1641d ago

### 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 (16 commits)")

---

Tags

bootstrapfonticonratingstarsvgpluginjqueryyii2extensionwidgetbootstrapforminputRatingstar

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

184.1M6](/packages/kartik-v-yii2-widget-touchspin)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[kartik-v/yii2-widget-rangeinput

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

193.9M3](/packages/kartik-v-yii2-widget-rangeinput)[kartik-v/yii2-widget-datepicker

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).

1097.0M60](/packages/kartik-v-yii2-widget-datepicker)

PHPackages © 2026

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