Search by

ki5an / laraicons

A Laravel package for integrating Iconify icons into reusable Blade components

Maintainers

Package info

github.com/ki5an/laraicons

pkg:composer/ki5an/laraicons

Transparency log

Fund package maintenance!

ki5an

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.2 2026-09-06 16:48 UTC

This package is auto-updated.

Last update: 2026-09-06 16:49:12 UTC


README

Latest Version on Packagist

Generate reusable Laravel Blade components from Iconify icon sets.

LaraIcons lets you select icons from Iconify's large collection of open-source icon sets and generate them as native Laravel Blade components.

Installation

Install LaraIcons with Composer:

composer require ki5an/laraicons

Laravel discovers the service provider automatically. To publish the package configuration, run:

php artisan vendor:publish --tag=laraicons-config

This creates config/laraicons.php, where you can configure the Blade component name, generated view path, and icons to sync.

Configuration

Bind the icons you want to generate in config/laraicons.php:

'view_path' => 'views/components/icon',
'component' => 'lara-icon',

'icons' => [
    'lucide' => [
        'activity',
        'alarm-clock',
    ],
    'heroicons' => [
        'home',
        'heart',
    ],
],

view_path is the directory under resources/ where generated icon views are stored. component is the Blade component prefix used when rendering icons:

<x-lara-icon name="lucide:activity" />

For example, changing component to app-icon lets you render the same icon with <x-app-icon name="lucide:activity" />.

Usage

After syncing an icon, render it with the collection and icon name:

<x-lara-icon name="heroicons:home" class="h-5 w-5" />

Configure collections and icons in config/laraicons.php, then sync them:

php artisan icons:sync
php artisan icons:sync --force

Use --force or the legacy override mode to replace generated files without being prompted.