PHPackages                             mrshanebarron/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. mrshanebarron/rating

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

mrshanebarron/rating
====================

Star rating component for Laravel - supports Livewire and Vue

v1.0.2(4mo ago)012MITBladePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/rating)[ Packagist](https://packagist.org/packages/mrshanebarron/rating)[ RSS](/packages/mrshanebarron-rating/feed)WikiDiscussions main Synced 1mo ago

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

Rating
======

[](#rating)

A star rating component for Laravel applications. Supports interactive ratings and read-only display. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/rating

```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### Display Only (Read-only)

[](#display-only-read-only)

```

```

### Different Max Stars

[](#different-max-stars)

```

```

### Different Sizes

[](#different-sizes)

```

```

### Different Colors

[](#different-colors)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`wire:model`number-Bound rating value`max`number`5`Maximum stars`readonly`boolean`false`Disable interaction`size`string`'md'`Size: `sm`, `md`, `lg``color`string`'yellow'`Color themeVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbRating } from './vendor/sb-rating';
app.component('SbRating', SbRating);

```

### Basic Usage

[](#basic-usage-1)

```

  You rated: {{ rating }} stars

import { ref } from 'vue';
const rating = ref(0);

```

### Read-only Display

[](#read-only-display)

```

```

### Custom Max

[](#custom-max)

```

```

### Sizes

[](#sizes)

```

```

### Colors

[](#colors)

```

```

### Product Review Example

[](#product-review-example)

```

      Your Rating

      Review

    Submit Review

import { ref } from 'vue';

const review = ref({
  rating: 0,
  comment: ''
});

const submitReview = () => {
  // Submit review
};

```

### Average Rating Display

[](#average-rating-display)

```

      {{ averageRating.toFixed(1) }} ({{ totalReviews }} reviews)

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`Number`0`Current rating (v-model)`max`Number`5`Maximum number of stars`readonly`Boolean`false`Prevent interaction`size`String`'md'`Star size: `sm`, `md`, `lg``color`String`'yellow'`Fill color: `yellow`, `orange`, `red`, `blue`### Events

[](#events)

EventPayloadDescription`update:modelValue``number`Emitted when rating changesSize Reference
--------------

[](#size-reference)

SizeDimensions`sm`16x16px`md`24x24px`lg`32x32pxColor Options
-------------

[](#color-options)

ColorTailwind Class`yellow`text-yellow-400`orange`text-orange-400`red`text-red-400`blue`text-blue-400Features
--------

[](#features)

- **Interactive**: Click to set rating
- **Read-only Mode**: Display ratings without interaction
- **Hover Effects**: Scale animation on hover
- **Customizable**: Colors, sizes, max stars

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Filled stars use selected color
- Empty stars are gray
- Hover scale animation
- Smooth transitions

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance79

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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 ~1 days

Total

3

Last Release

144d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

---

Tags

laravellivewirereviewstarsvueRating

### Embed Badge

![Health badge](/badges/mrshanebarron-rating/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-rating/health.svg)](https://phpackages.com/packages/mrshanebarron-rating)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9385.0M85](/packages/livewire-flux)[ghanem/rating

Rating system for Laravel

8615.5k](/packages/ghanem-rating)[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[mischasigtermans/laravel-altitude

Claude Code agents for the TALL stack, powered by Laravel Boost

1139.2k](/packages/mischasigtermans-laravel-altitude)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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