yieldstudio / filament-panel
A simple, friendly panel plugin for Filament.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/yieldstudio/filament-panel
Requires
- php: ^8.2
- filafly/filament-phosphor-icons: ^2.0
- filament/filament: ^4.0
- illuminate/contracts: ^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.2|^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.0|^8.0
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.0|^3.0
- pestphp/pest-plugin-laravel: ^2.0|^3.0
- pestphp/pest-plugin-livewire: ^3.0
- pestphp/pest-plugin-type-coverage: ^3.5
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.1|^11.0|^12.0
- rector/rector: ^2.1
- spatie/laravel-ray: ^1.40
This package is not auto-updated.
Last update: 2025-12-04 06:21:57 UTC
README
A comprehensive Filament plugin package that provides enhanced UI components, developer tools, and customization options for Filament panels.
Features
- YieldPanel Plugin: Pre-configured panel with customizable colors, fonts, and icons
- Environment Indicator: Visual indicator showing the current environment (production, staging, development)
- Developer Login: Quick login widget for development environments
- Copy Action: Enhanced copy-to-clipboard action with visual feedback
- Progress Bar Column: Advanced table column with customizable progress bars and thresholds
- Phosphor Icons: Integration with Phosphor icon set
Installation
You can install the package via composer:
composer require yieldstudio/filament-panel
Usage
YieldPanel Plugin
The main plugin that provides a pre-configured panel setup with optional suggested colors, fonts, and icons.
use YieldStudio\FilamentPanel\Plugins\YieldPanel; public function panel(Panel $panel): Panel { return $panel ->plugin( YieldPanel::make() ->withSuggestedColors() // Apply YieldStudio color palette ->withSuggestedFont() // Use Inter font ->withSuggestedIcons() // Use Phosphor icons ); }
Methods:
withSuggestedColors(bool $condition = true): Apply primary (#027BFC) and secondary (#151D53) color paletteswithSuggestedFont(bool $condition = true): Use Inter as the default fontwithSuggestedIcons(bool $condition = true): Enable Phosphor duotone icons
Environment Indicator Plugin
Display a visual indicator badge showing the current application environment.
use YieldStudio\FilamentPanel\Plugins\EnvironmentIndicator; public function panel(Panel $panel): Panel { return $panel ->plugin( EnvironmentIndicator::make() ->visible(fn () => auth()->user()?->hasRole('super_admin')) ->showBadge(fn (): bool => !app()->environment('production')) ->color(fn (): array => match (app()->environment()) { 'production' => Color::Red, 'staging' => Color::Orange, 'development' => Color::Blue, default => Color::Gray, }) ->badgePosition(PanelsRenderHook::GLOBAL_SEARCH_BEFORE) ); }
Methods:
visible(bool|Closure $visible): Control when the indicator is visibleshowBadge(bool|Closure $showBadge): Toggle badge displaycolor(array|Closure $color): Set badge color based on environmentbadgePosition(string $position): Define where the badge appears (default: before global search)
Default Behavior:
- Visible only to super_admin users
- Hidden in production, shown in other environments
- Color-coded: Red (production), Orange (staging), Blue (development)
Developer Login Plugin
Quick login widget for development environments with one-click user switching.
use YieldStudio\FilamentPanel\Plugins\DevelopperLogin; public function panel(Panel $panel): Panel { return $panel ->plugin( DevelopperLogin::make() ->enabled(fn () => app()->isLocal()) ->users([ 'Admin User' => 'admin@example.com', 'Regular User' => 'user@example.com', ]) ->modelClass(\App\Models\User::class) ); }
Methods:
enabled(bool|Closure $condition): Enable/disable the login widget (default: local environment only)users(array|Closure $users): Array of user credentials for quick loginmodelClass(string|Closure $modelClass): User model class (default:\App\Models\User)
Security Note: Only enable in development/local environments!
Copy Action
Enhanced copy-to-clipboard action with automatic object/array formatting and success notifications.
use YieldStudio\FilamentPanel\Actions\CopyAction; // In a table public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('id'), TextColumn::make('email'), ]) ->actions([ CopyAction::make() ->copyable(fn ($record) => $record->email), ]); } // In a form or infolist CopyAction::make() ->copyable(fn ($record) => $record->api_key) ->successNotificationTitle('API Key copied!')
Features:
- Automatically formats objects/arrays as readable text
- Success notification with customizable message
- Tooltip support
- Compatible with tables, forms, and infolists
Progress Bar Column
Advanced table column displaying progress bars with customizable thresholds and colors.
use YieldStudio\FilamentPanel\Tables\Columns\ProgressBarColumn; public static function table(Table $table): Table { return $table ->columns([ ProgressBarColumn::make('stock') ->maxValue(100) ->lowThreshold(20) ->dangerColor('rgb(244, 63, 94)') ->warningColor('rgb(251, 146, 60)') ->successColor('rgb(34, 197, 94)') ->dangerLabel(fn ($state) => $state <= 0 ? 'Out of stock' : $state) ->warningLabel(fn ($state) => $state . ' - Low stock') ->successLabel(fn ($state) => $state . ' - In stock'), ]); }
Methods:
maxValue(int|Closure $value): Maximum value for progress calculationlowThreshold(int|Closure $value): Threshold for warning statedangerColor(string|array|Closure $color): Color when value ≤ 0warningColor(string|array|Closure $color): Color when value ≤ thresholdsuccessColor(string|array|Closure $color): Color when value > thresholddangerLabel(string|Closure $label): Label for danger statewarningLabel(string|Closure $label): Label for warning statesuccessLabel(string|Closure $label): Label for success state
Default Colors:
- Danger: Red (
rgb(244, 63, 94)) - Warning: Orange (
rgb(251, 146, 60)) - Success: Green (
rgb(34, 197, 94))
Translations
The package includes translations for English and French. Publish the language files to customize:
php artisan vendor:publish --tag="yield-panel-translations"
Views
Publish the views for customization:
php artisan vendor:publish --tag="yield-panel-views"
Configuration
Publish the configuration file:
php artisan vendor:publish --tag="yield-panel-config"
Testing
composer test
Run static analysis:
composer analyse
Run code formatting:
composer lint
Run refactoring:
composer refactor
Run all quality checks:
composer finalize
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
Proprietary. See LICENSE.md for more information.