Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rating Star For Filament Laravel Package

l3aro/rating-star-for-filament

Add a star-rating field to Filament forms and tables with an easy-to-use UI. Display and edit ratings using customizable stars and sensible defaults, making it quick to collect feedback and show score values inside your admin panel.

View on GitHub
Deep Wiki
Context7

Rating star for filament table column and schemas.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Filament plugin that provides elegant star rating components for forms, tables, and infolists. Features interactive rating input with support for half-stars and zero values, fully customizable star count, color, and icon size. Perfect for collecting and displaying user ratings in any Filament-powered panel.

Installation

You can install the package via composer:

composer require l3aro/rating-star-for-filament

[!IMPORTANT] If you have not set up a custom theme and are using Filament Panels follow the instructions in the Filament Docs first.

After setting up a custom theme add the plugin's views to your theme css file or your app's css file if using the standalone packages.

@source '../../../../vendor/l3aro/rating-star-for-filament/resources/**/*.blade.php';

You can publish the config file with:

php artisan vendor:publish --tag="filament-rating-star-config"

Optionally, you can publish the views using

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

This is the contents of the published config file:

use Filament\Support\Colors\Color;
use Filament\Support\Enums\IconSize;

return [
    'stars' => 5,
    'allow_half_star' => false,
    'allow_zero' => false,
    'color' => Color::Amber,
    'icon_size' => IconSize::Medium,
];

Usage

Form Field

Use StarInput in your form schema:

use l3aro\FilamentRatingStar\Components\StarInput;
use Filament\Support\Colors\Color;
use Filament\Support\Enums\IconSize;

StarInput::make('rating')
    ->stars(5)              // Number of stars (default: 5)
    ->allowHalfStar()       // Enable half-star selection (default: false)
    ->allowZero()           // Allow zero rating (default: false)
    ->color(Color::Amber)   // Star color (default: Amber)
    ->iconSize(IconSize::Medium); // Star size (default: Medium)

Table Column

Use StarColumn in your table:

use l3aro\FilamentRatingStar\Components\StarColumn;
use Filament\Support\Colors\Color;
use Filament\Support\Enums\IconSize;

StarColumn::make('rating')
    ->stars(5)              // Number of stars to display (default: 5)
    ->color(Color::Amber)    // Star color (default: Amber)
    ->iconSize(IconSize::Medium); // Star size (default: Medium)

Infolist Entry

Use StarEntry in your infolist:

use l3aro\FilamentRatingStar\Components\StarEntry;
use Filament\Support\Colors\Color;
use Filament\Support\Enums\IconSize;

StarEntry::make('rating')
    ->stars(5)              // Number of stars to display (default: 5)
    ->color(Color::Amber)    // Star color (default: Amber)
    ->iconSize(IconSize::Medium); // Star size (default: Medium)

Register Plugin

Enable the plugin in your PanelProvider:

use l3aro\FilamentRatingStar\FilamentRatingStarPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentRatingStarPlugin::make(),
        ]);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky