Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

binggle's avatar

Have somebody tried 'blade-ui-kit/blade-icons' ?

How can I use blade-ui-kit/blade-icons ?

I did this following.

It is for suring I made fresh project and installed blade-icon package only.

laravel new icon-demo

cd icon-demo

php artisan config:clear

composer require blade-ui-kit/blade-icons

php artisan vendor:publish --tag=blade-icons

php artisan serve 

in welcome.blade.php, I added this.

<x-icon-camera/>

It shows error.

Unable to locate a class or view for component [icon-camera].

I edited 'config/blade-icons.php'

return [
    'components' => [
        'default' => 'svg',
    ],
];

in welcome.blade.php

<x-svg name="camera"/>

if gives Error

BladeUI\Icons\Exceptions\SvgNotFound
Svg by name "camera" from set "default" not found.

How can I use blade-icons package?

1 like
7 replies
aurelianspodarec's avatar

@binggle This isn't best answer ,you didn't tell us what you did. That's cheating for a best answer points.

2 likes
pSouper's avatar

hey binggle did you wirk this our or revert to defaults ?

fazlerabbi's avatar

Just create an svg folder in the resources. I solved it this way.

2 likes
Emmanuel71's avatar

Sorry to reply on such an old post. But I ran into the same problem recently, as did my colleague, and thought I might make things clearer for others by adding this info.

It seems to me that the error "Unable to locate a class or view for component" is due to the fact that the package 'blade-ui-kit/blade-icons' does not come with any icons. When you follow the installation guide of 'blade-ui-kit/blade-icons' this is not clearly mentioned in my opinion. So when they give an example of how to use it in blade after installing, they forget to mention you should have placed the correct svg file in the 'resource/svg' folder. So I suppose this package is for adding svg icons manually to your project. Just correct me if you think I'm wrong.

eugenefvdm's avatar

Sorry to reply on such an old post.

I don't think you have to apologize. Things change over time and sometimes new things happen. Also the original poster @binggle did us all a huge disfavor by not giving us the resolution to their issue.

Back to my problem, I suddenly starting receiving this error on a fairly clean Filament PHP installation:

BladeUI\ Icons\Exceptions\ SvgNotFound
PHP 8.3.12
11.20.0
Svg by name "cloud-upload" from set "default" not found.

It's quite the rabbit hole to find the source of this problem. Very much because Filament indirectly uses Blade UI Kit. Also it appears Blade UI Kit isn't well maintained anymore referring to Mix instead of Vite, no search in the docs, etc.

In the end this page solved it for me: https://filamentphp.com/docs/3.x/support/icons

I had to do 3 steps:

php artisan vendor:publish --tag=blade-icons

After adding that config file, the final step was uncommenting the sets, default section, like below:

'sets' => [

        // 'default' => [
        //
        //     /*
        //     |-----------------------------------------------------------------
        //     | Icons Path
        ...

Uncomment the whole default block.

  1. Add an actual SVG to resources/svg/cloud-upload.svg.

So I guess if someone else is having the problem, try to find your default reference in sets and make sure the SVG path exists and has an actual file in it.

1 like

Please or to participate in this conversation.