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

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

jodeveloper/filament-rating
===========================

The rating field with icons and colors for the Filament forms

1.0.6(5mo ago)022MITPHPPHP ^8.0

Since Nov 10Pushed 5mo agoCompare

[ Source](https://github.com/JoDeveloper/filament-rating-field)[ Packagist](https://packagist.org/packages/jodeveloper/filament-rating)[ Docs](https://github.com/jodeveloper/filament-rating)[ RSS](/packages/jodeveloper-filament-rating/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (13)Versions (8)Used By (0)

Filament Rating Field
=====================

[](#filament-rating-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aa263f943beed9d4e6aa33be8eff354b1e37c1f30227043c1567b1593e272b66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f646576656c6f7065722f66696c616d656e742d726174696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jodeveloper/filament-rating)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3c2efad101d7c287660a9db8b954c7ded1776ed8bd273db4bf7af634561d63e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6f646576656c6f7065722f66696c616d656e742d726174696e672f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/jodeveloper/filament-rating/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d0529fb8b70f0da740ce44e70ad4919bb812bf16ead3ef65e6a5fe0ec75252ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6f646576656c6f7065722f66696c616d656e742d726174696e672f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/jodeveloper/filament-rating/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b54c9d64e780a58392803c1ed44d5baea0041aa9720b9d0c2b4d804ee5ee21e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f646576656c6f7065722f66696c616d656e742d726174696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jodeveloper/filament-rating)

A rating field for Filament forms with support for icons, colors, and inline alignment.

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

[](#installation)

You can install the package via composer:

```
composer require jodeveloper/filament-rating
```

Add the package blade files the content section of the ***tailwind.config.js*** file.

```
module.exports = {
    content: [
        "./resources/**/*.blade.php",
        "./vendor/jodeveloper/**/*.blade.php", // Add this line
    ],
    theme: {
        extend: {},
    },
    plugins: [],
}
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-rating-views"
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Jodeveloper\FilamentRating\Forms\Components\Rating;

Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->inline(true),
```

### With Icons

[](#with-icons)

```
Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->icons([
        '1' => '',
        '2' => '',
        '3' => '',
        '4' => '',
        '5' => '',
    ])
    ->inline(true),
```

### With Colors

[](#with-colors)

```
Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->color('yellow')
    ->inline(true),
```

### With Icons and Individual Colors

[](#with-icons-and-individual-colors)

```
Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->icons([
        '1' => 'heroicon-m-star',
        '2' => 'heroicon-m-star',
        '3' => 'heroicon-m-star',
        '4' => 'heroicon-m-star',
        '5' => 'heroicon-m-star',
    ])
    ->colors([
        '1' => 'red',
        '2' => 'orange',
        '3' => 'yellow',
        '4' => 'lime',
        '5' => 'green',
    ])
    ->showLabel(true)
    ->inline(true),
```

> **Note**: You can use any icon name from the [Blade Icons library](https://github.com/driesvints/blade-icons). The package will automatically render the icon with the appropriate color and styling.

### With Individual Colors and Default Color

[](#with-individual-colors-and-default-color)

```
Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->icons([
        '1' => 'heroicon-m-star',
        '2' => 'heroicon-m-star',
        '3' => 'heroicon-m-star',
        '4' => 'heroicon-m-star',
        '5' => 'heroicon-m-star',
    ])
    ->colors([
        '1' => 'red',
        '5' => 'green',
    ])
    ->defaultColor('blue')
    ->showLabel(true)
    ->inline(true),
```

> **Note**: You can use any icon name from the [Blade Icons library](https://github.com/driesvints/blade-icons). The package will automatically render the icon with the appropriate color and styling.

### Hide Labels (Show Only Icons)

[](#hide-labels-show-only-icons)

```
Rating::make('rating')
    ->label('Rate your experience')
    ->options([
        '1' => 'Poor',
        '2' => 'Fair',
        '3' => 'Good',
        '4' => 'Very Good',
        '5' => 'Excellent'
    ])
    ->icons([
        '1' => '',
        '2' => '',
        '3' => '',
        '4' => '',
        '5' => '',
    ])
    ->color('yellow')
    ->showLabel(false)
    ->inline(true),
```

Methods
-------

[](#methods)

- `icons(array $icons)`: Set the icons for the rating options. The array key should match the option value.
- `colors(array $colors)`: Set individual colors for each rating option. The array key should match the option value.
- `defaultColor(string $color)`: Set the default color for rating options when no individual color is specified (e.g., 'yellow', 'blue', 'green', 'red').
- `color(string $color)`: Alias for `defaultColor()` method.
- `showLabel(bool $showLabel = true)`: Set whether to show the label alongside the icon.
- `inline(bool $inline = true)`: Set whether the options should be displayed inline.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/jodeveloper/filament-rating/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/jodeveloper/filament-rating/security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [JoDeveloper](https://github.com/jodeveloper)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance73

Regular maintenance activity

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.4% 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 ~12 days

Recently: every ~18 days

Total

7

Last Release

154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90a228b8f28fb5cf07826b801bb52e14e8b673b4f1f1f1ff65b4eca8519eba80?d=identicon)[JoDeveloper08](/maintainers/JoDeveloper08)

---

Top Contributors

[![JoDeveloper](https://avatars.githubusercontent.com/u/18007194?v=4)](https://github.com/JoDeveloper "JoDeveloper (36 commits)")[![suleymanozev](https://avatars.githubusercontent.com/u/20399264?v=4)](https://github.com/suleymanozev "suleymanozev (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![cobraprojects](https://avatars.githubusercontent.com/u/42706279?v=4)](https://github.com/cobraprojects "cobraprojects (1 commits)")[![moskoweb](https://avatars.githubusercontent.com/u/6052272?v=4)](https://github.com/moskoweb "moskoweb (1 commits)")[![saulens22](https://avatars.githubusercontent.com/u/9000854?v=4)](https://github.com/saulens22 "saulens22 (1 commits)")

---

Tags

laraveliconsRatingcolorsfilament-ratingjodeveloper

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

328482.0k25](/packages/codewithdennis-filament-select-tree)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[rawilk/filament-password-input

Enhanced password input component for filament.

52250.4k11](/packages/rawilk-filament-password-input)[nativephp/desktop

NativePHP for Desktop

38133.6k8](/packages/nativephp-desktop)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124581.3k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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