mckenziearts/filament-untitledui-icons
Installation:
composer require mckenziearts/filament-untitledui-icons
Add the plugin to your PanelProvider:
public function panel(Panel $panel): Panel
{
return $panel->plugin(UntitleduiIcons::make());
}
First Use Case:
Replace default Filament icons globally with Untitled UI’s set. No additional configuration is needed beyond registration—all existing icon usages (e.g., Icon::make('heroicon-o-pencil')) will now render as Untitled UI icons.
Where to Look First:
UntitleduiIcons::make() methods for style customization (e.g., regular()).Global Replacement:
Register the plugin once in PanelProvider to replace all icons across your Filament admin panel. No per-resource or per-view configuration is required.
Style Consistency:
Set a default style (e.g., UntitleduiIcons::make()->regular()) in PanelProvider to ensure uniformity. Override styles for specific icons only when necessary.
Icon Alias Mapping:
Use Filament’s icon aliases (e.g., heroicon-o-pencil) to map to Untitled UI’s equivalent. The package handles the underlying SVG rendering automatically.
Dynamic Styling: Override styles for subsets of icons in resource/views or widgets:
UntitleduiIcons::make()
->overrideStyleForAlias('heroicon-o-pencil', 'bold') // Hypothetical style
->overrideStyleForAlias(['heroicon-o-trash', 'heroicon-o-eye'], 'outline');
Alias Mismatches:
dd(UntitleduiIcons::getAvailableIcons()) to list supported aliases.Style Inconsistencies:
.filament-icon {
width: 1em;
height: 1em;
color: inherit; /* Ensure color matches Filament’s theme */
}
Plugin Registration Order:
UntitleduiIcons after other icon providers (e.g., FilamentIcons) to avoid conflicts. The last registered provider typically takes precedence.Caching Issues:
php artisan filament:cache:clear) if icons fail to update after style changes.<style> or <svg> tags injected by the package).\Log::info('Active styles:', UntitleduiIcons::make()->getStyles());
Custom Styles:
Extend the package by adding new styles (e.g., UntitleduiIcons::make()->addStyle('custom', 'path/to/style.css')) if the default "Regular" doesn’t meet needs.
Icon Alias Extensions:
Override the getIconAliases() method in a service provider to map custom aliases to Untitled UI icons:
UntitleduiIcons::extend(function ($plugin) {
$plugin->alias('custom-icon', 'untitled-ui-icon-name');
});
Dynamic Loading:
For large admin panels, defer icon loading by implementing a custom UntitleduiIcons class that conditionally loads styles based on the current route:
public function getStyles(): array
{
return request()->routeIs('admin.resources*') ? ['bold'] : ['regular'];
}
How can I help you explore Laravel packages today?