New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

orchid/blade-icons

An easy way inline SVG images in your Blade templates.
3,729,069 22

Larablocks Analysis

orchid/blade-icons works with Laravel 10 to 13 (latest release 4.4.0, Mar 21, 2026).

Laravel 7, 8 and 9 in earlier releases.

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 3 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Mar 21, 2026)
  • 46,193 downloads a month (at least 10,000)
  • 22 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Mar 21, 2026.
  • 1 release in the last 12 months.
  • First released: Jun 25, 2020.
  • Monthly downloads: 46,193, up 51% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require orchid/blade-icons
Latest Version:4.4.0
Laravel:10 – 13
Older releases:7 · 8 · 9
License:MIT
Last Updated:Mar 21, 2026
Links: GitHub  ·  Packagist
Maintainer: tabuna

Inline SVG Icons for Laravel Blade

Packagist Packagist Version

This package for the Laravel framework allows you to use Blade components to insert inline SVG images.

Installation

To install this package, run the following command in your command line:

$ composer require orchid/blade-icons

Basic Usage

To register a directory with your files in the service provider, use the following code:

namespace App\Providers;

use Orchid\Icons\IconFinder;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(IconFinder $iconFinder) : void
    {
        $iconFinder->registerIconDirectory('fa', storage_path('app/fontawesome'));
    }
}

When calling the directory method with the first argument, we pass the prefix to call our icons and the second argument is the directory where they are located.

After that, we can call the component in our blade templates:

<x-orchid-icon path="fa.home" />

If you use one or two sets of icons that do not repeat, then it is not necessary to specify a prefix in the component:

<x-orchid-icon path="home" />

You can also list some attributes that should be applied to your icon:

<x-orchid-icon 
    path="home" 
    class="icon-big" 
    width="2em" 
    height="2em" />

Static call from a PHP class:

IconComponent::make(
    path: 'fa.home',
    id: 101,
    class: 'red',
);

Default Sizes

If you are using icons from the same set, it makes sense to specify a default size value:

namespace App\Providers;

use Orchid\Icons\IconFinder;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(IconFinder $iconFinder): void
    {
        $iconFinder
            ->registerIconDirectory('fa', storage_path('app/fontawesome'))
            ->setSize('54px', '54px');
    }
}

If you use different sets, for example, in the public part of the application and in the admin panel, then you can dynamically change the value in the middleware:

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Orchid\Icons\IconFinder;

class ExampleMiddleware
{
    public function __construct(
        private IconFinder $iconFinder
    ) {}

    /**
     * Handle an incoming request.
     */
    public function handle(Request $request, Closure $next): mixed
    {
        $this->iconFinder->setSize('54px', '54px');

        return $next($request);
    }
}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released Laravel License
4.4.0 ^10.0|^11.0|^12.0|^13.0 MIT
4.3.0 ^10.0|^11.0|^12.0 MIT
4.2.0 ^10.0|^11.0 MIT
4.1.1 ^10.0|^11.0 MIT
4.1.0 ^10.0|^11.0 MIT