ntpages/laravel-sprite

Laravel SVG Sprite generator

Maintainers

Package info

github.com/ntpages/laravel-sprite

pkg:composer/ntpages/laravel-sprite

Statistics

Installs: 40

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2021-05-18 05:51 UTC

This package is not auto-updated.

Last update: 2026-03-19 06:21:36 UTC


README

Little package that simply offers you the dynamic sprite generation of your svg assets.

Why?

In case you use two or more SVGs on the page specially if the code amount on them is huge.

How?

Simply install the composer package
composer require ntpages/laravel-sprite

Create your svg directories with icons in the configured path, default:
./resources/svg/**/*.svg

Use anywhere you want, default route:\

<svg xmlns="http://www.w3.org/2000/svg">
    <use xlink:href="{{ route('sprite.svg', ['name' => 'directory-name']) }}#icon-name"></use>
</svg>