caresome/filament-neobrutalism-theme
Installation:
composer require caresome/filament-neobrutalism-theme
Register the plugin in app/Providers/Filament/AdminPanelProvider.php:
public function panel(Panel $panel): Panel
{
return $panel
->id('admin')
->plugin(NeobrutalismTheme::make())
->...
}
First Use Case:
Plugin Registration:
AdminPanelProvider (supports both Filament v4 and v5).->plugin(NeobrutalismTheme::make()
->customize(fn (NeobrutalismTheme $theme) => $theme
->borderWidth(4) // Override default border width
->shadowRadius(12) // Adjust shadow intensity
)
)
Resource-Specific Overrides:
protected static ?string $theme = NeobrutalismTheme::class;
public static function getTheme(): array
{
return [
'borderColor' => '#ff0000',
'backgroundColor' => '#1a1a1a',
];
}
Dark Mode Adaptation:
->customize(fn ($theme) => $theme
->darkModeBorderColor('#ffffff')
)
Widget Integration:
<div style="
--neobrutalism-border-width: 3px;
--neobrutalism-border-color: #3b82f6;
border: var(--neobrutalism-border-width) solid var(--neobrutalism-border-color);
box-shadow: 0 0 10px var(--neobrutalism-border-color);
">
Custom Widget
</div>
CSS Variable Conflicts:
!important sparingly or inspect the generated CSS to resolve conflicts..filament-neobrutalism-theme {
border-width: var(--neobrutalism-border-width) !important;
}
Performance with Heavy Customization:
--neobrutalism-border-width, --neobrutalism-shadow-color) for optimal performance.Filament v4 vs. v5:
Authentication Pages:
panel() middleware to conditionally load the theme.Inspect Generated CSS:
Elements > Styles) to verify applied CSS variables. Look for filament-neobrutalism-theme classes.Variable Precedence:
customize() override defaults. Use the Available CSS Variables section in the README to debug missing styles.Clear Cache:
php artisan filament:cache-reset
php artisan view:clear
Dynamic Theming:
getTheme() hook to dynamically apply themes per user/role:
public static function getTheme(): array
{
return auth()->user()->is_admin ? ['borderColor' => '#ff0000'] : [];
}
Custom CSS:
resources/css/filament/neobrutalism-extensions.css:
.filament-neobrutalism-theme .custom-class {
--neobrutalism-border-radius: 8px;
}
resources/css/app.css or via Filament’s asset pipeline.Plugin Composition:
filament/spatie-laravel-medialibrary) by ensuring their styles respect neobrutalism variables. Example:
->plugin(NeobrutalismTheme::make())
->plugin(MediaLibraryPlugin::make())
How can I help you explore Laravel packages today?