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

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

yepsua/filament-rating-field
============================

Ranting field for the Filament forms

v0.7.0(10mo ago)4736.7k↓46.7%14[2 PRs](https://github.com/yepsua/filament-rating-field/pulls)MITPHPPHP ^8.0CI passing

Since Sep 15Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/yepsua/filament-rating-field)[ Packagist](https://packagist.org/packages/yepsua/filament-rating-field)[ Docs](https://github.com/yepsua/filament-rating-field)[ RSS](/packages/yepsua-filament-rating-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (14)Versions (11)Used By (0)

Rating field for the Filament forms
===================================

[](#rating-field-for-the-filament-forms)

 [![Rating](https://user-images.githubusercontent.com/1541517/170590811-be2e4a1b-e3e1-4050-b239-fd74ec5c3036.png)](https://user-images.githubusercontent.com/1541517/170590811-be2e4a1b-e3e1-4050-b239-fd74ec5c3036.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/72982e23675e7553e8548cfcdea716eb0894de4abf5fef4342fa59145acfea73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7965707375612f66696c616d656e742d726174696e672d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yepsua/filament-rating-field)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a88cb3d39778a79c6613ddbab9316f9badb71a191323e4eb05bc6b96c9daaaf0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7965707375612f66696c616d656e742d726174696e672d6669656c642f72756e2d74657374732e796d6c3f6c6162656c3d7465737473)](https://github.com/yepsua/filament-rating-field/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f65e68ebba70f2ba2b6c554d4eabd54da00b190befbdc621d950587a16bdc690/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7965707375612f66696c616d656e742d726174696e672d6669656c642f7068702d63732d66697865722e796d6c3f6c6162656c3d636f64652532307374796c65)](https://github.com/yepsua/filament-rating-field/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/b2098fe9646c68542643903ae78ca830e24fa759a43989193a8f369ae3a3219a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7965707375612f66696c616d656e742d726174696e672d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yepsua/filament-rating-field)

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

[](#installation)

You can install the package via composer:

```
composer require yepsua/filament-rating-field
```

Optionally, you can publish the views using

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

Usage
-----

[](#usage)

### Form Field

[](#form-field)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590817-ced610bc-1756-40df-a66b-f305963c90c5.png)](https://user-images.githubusercontent.com/1541517/170590817-ced610bc-1756-40df-a66b-f305963c90c5.png)

By default the range values goes from 1 to 5 and the icon displayed is `heroicon-o-star`

The rating fields provides several option to customize its behavior. Next some of the more used for:

#### *Disabled*

[](#disabled)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->disabled()
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590815-ec38c2f6-2523-4d44-934b-d3968f5007af.png)](https://user-images.githubusercontent.com/1541517/170590815-ec38c2f6-2523-4d44-934b-d3968f5007af.png)

#### *Min and max values*

[](#min-and-max-values)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->min(5)
                ->max(10)
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590813-4894ff7a-b6cb-45d2-9a19-70bafecaec75.png)](https://user-images.githubusercontent.com/1541517/170590813-4894ff7a-b6cb-45d2-9a19-70bafecaec75.png)

#### *Custom icons and colors*

[](#custom-icons-and-colors)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->icons('heroicon-o-moon', 'heroicon-s-sun')
                ->color('orange')
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590812-425255b6-4f4c-49bb-b0c8-f0ca52a6d864.png)](https://user-images.githubusercontent.com/1541517/170590812-425255b6-4f4c-49bb-b0c8-f0ca52a6d864.png)

#### *Custom size*

[](#custom-size)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->size(10)
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590811-be2e4a1b-e3e1-4050-b239-fd74ec5c3036.png)](https://user-images.githubusercontent.com/1541517/170590811-be2e4a1b-e3e1-4050-b239-fd74ec5c3036.png)

#### *No mouse effects*

[](#no-mouse-effects)

Disable the mouseenter and mouseleave animation.

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->effects(false)
            ...
        ];
    }
...
```

#### *Clearable*

[](#clearable)

Allow the user to clear the rating selection.

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->clearable()
                ->clearIconColor('red')
                ->clearIconTooltip('Clear')
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590810-07cee8bd-0ce0-4200-b2bc-b5616e8f5dad.png)](https://user-images.githubusercontent.com/1541517/170590810-07cee8bd-0ce0-4200-b2bc-b5616e8f5dad.png)

#### *Cursors*

[](#cursors)

The value of the cursor is based on the [Tailwind cursor](https://tailwindcss.com/docs/cursor). The prefix `cursor-` its not required in the value.

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->cursor('default')
                ->clearIconTooltip('none')
            ...
        ];
    }
...
```

#### *Tooltips*

[](#tooltips)

```
use Yepsua\Filament\Forms\Components\Rating

...
    protected function getFormSchema(): array
    {
        return [
            ...
            Rating::make('rating')
                ->options([
                    'Acceptable',
                    'Good',
                    'Very Good',
                    'Excellent',
                ])
            ...
        ];
    }
...
```

 [![Rating](https://user-images.githubusercontent.com/1541517/170590808-ea0986d2-db3f-47d4-ab52-80f91667e890.png)](https://user-images.githubusercontent.com/1541517/170590808-ea0986d2-db3f-47d4-ab52-80f91667e890.png)

#### Field options.

[](#field-options)

- -&gt;color(): Set the icon colors for the rating field.
- -&gt;disabledColor(): Set the icon color when the field is disabled.
- -&gt;clearIconColor(): Set the color for the clear icon.
- -&gt;icon(): Set the icon for the default items.
- -&gt;selectedIcon(): Set the solid icon for the selected items.
- -&gt;clearIcon(): Set the icon for the clear action.
- -&gt;min(): Set the min value for the rating field. Default: 1
- -&gt;max(): Set the max value for the rating field. Default: 5
- -&gt;width(): Set the width value for each item in the field: Default: 6
- -&gt;height(): Set the height value for each item in the field: Default: 6
- -&gt;size(): Set the same value for the width and height properties.
- -&gt;effects(): Enable\\Disable the mouseenter and mouseleave effects. Default: true (enabled)
- -&gt;clearable(): Add a extra icon at the end of the rating icons. Default: false
- -&gt;cursor(): Set the default cursor
- -&gt;disabledCursor(): Set the cursor to be displayed when the field is disabled
- -&gt;clearIconTooltip(): Set the tooltip for the clear icon.

You can review the default value for the options above and others in the class `App\Forms\Components\Rating`

### Table Column

[](#table-column)

```
use Yepsua\Filament\Tables\Components\RatingColumn;

// ...
protected function getTableColumns(): array
{
    return [
        // ..
        RatingColumn::make('rating'),
        // ..
    ];
}
...
```

#### RatingColumn options.

[](#ratingcolumn-options)

- `RatingColumn::make('rating')->color()` Set the icon colors for the rating field.
- `RatingColumn::make('rating')->icon()` Set the icon for the default items.
- `RatingColumn::make('rating')->selectedIcon()` Set the solid icon for the selected items.
- `RatingColumn::make('rating')->icons()` Set the icons for the default items and for selected items.
- `RatingColumn::make('rating')->minValue()` Set the min value for the rating field. Default: 1
- `RatingColumn::make('rating')->maxValue()` Set the max value for the rating field. Default: 5
- `RatingColumn::make('rating')->width()` Set the width value for each item in the field: Default: 6
- `RatingColumn::make('rating')->height()` Set the height value for each item in the field: Default: 6
- `RatingColumn::make('rating')->size()` Set the same value for the width and height properties.
- `RatingColumn::make('rating')->options()` set tooltip

[![filament-page-with-sidebar](./images/rating-column.png)](./images/rating-column.png)

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/spatie/.github/blob/master/CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Omar Yepez](https://github.com/oyepez003)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance53

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~137 days

Total

8

Last Release

322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21730da81fbe12e7626a7e1fa51fdd68f14e94c5b8d18e6a933e0a9ad379514c?d=identicon)[oyepez003](/maintainers/oyepez003)

---

Top Contributors

[![oyepez003](https://avatars.githubusercontent.com/u/1541517?v=4)](https://github.com/oyepez003 "oyepez003 (19 commits)")[![gboquizosanchez](https://avatars.githubusercontent.com/u/20032391?v=4)](https://github.com/gboquizosanchez "gboquizosanchez (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![popjelev](https://avatars.githubusercontent.com/u/12712059?v=4)](https://github.com/popjelev "popjelev (1 commits)")[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (1 commits)")[![Tschucki](https://avatars.githubusercontent.com/u/43211841?v=4)](https://github.com/Tschucki "Tschucki (1 commits)")[![aymanalhattami](https://avatars.githubusercontent.com/u/34315778?v=4)](https://github.com/aymanalhattami "aymanalhattami (1 commits)")[![kingmaker-agm](https://avatars.githubusercontent.com/u/23194965?v=4)](https://github.com/kingmaker-agm "kingmaker-agm (1 commits)")[![mohamedsabil83](https://avatars.githubusercontent.com/u/10126040?v=4)](https://github.com/mohamedsabil83 "mohamedsabil83 (1 commits)")

---

Tags

laravelyepsuafilament-rating-field

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

###  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.

320392.1k17](/packages/codewithdennis-filament-select-tree)[ralphjsmit/laravel-filament-components

A collection of reusable components for Filament.

10972.2k2](/packages/ralphjsmit-laravel-filament-components)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[defstudio/filament-searchable-input

A searchable autocomplete input for Filament forms

3212.4k](/packages/defstudio-filament-searchable-input)[codebar-ag/laravel-filament-json-field

A Laravel Filament JSON Field integration with CodeMirror support

1124.1k](/packages/codebar-ag-laravel-filament-json-field)[jiten14/jitone-ai

jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.

213.1k](/packages/jiten14-jitone-ai)

PHPackages © 2026

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