FilamentF
Filament13mo ago
sohail

How to use custom icon

Hi i have this action on a table in livewire component and i am passing the icon and HTML string but i seem to render it as image
any idea on how i can using my font awesome pro icons

Livewire component
  ActionGroup::make([
  EditAction::make()
                    ->icon(new HtmlString(Blade::render('<i class="fal fa-edit"></i>')))
                    ->fillForm(fn(Organization $organization) => $organization->toArray())
                    ->form([
                        TextInput::make('name'),
                        TextInput::make('address'),
                        Textarea::make('description'),
                    ])
 ])
Screenshot_2024-12-03_at_19-05-14_Incrediverse.png
Solution
Did you check this section?
if you are using the package, I think you can use ->icon('fa-edit')
GitHub
A package to easily make use of Font Awesome in your Laravel Blade views. - owenvoke/blade-fontawesome
Was this page helpful?