https://github.com/tiknil/svg-sprite
Tool for creating an svg sprite from a folder of icons.
https://github.com/tiknil/svg-sprite
Last synced: 9 months ago
JSON representation
Tool for creating an svg sprite from a folder of icons.
- Host: GitHub
- URL: https://github.com/tiknil/svg-sprite
- Owner: tiknil
- License: mit
- Created: 2025-04-01T09:42:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-08T08:45:28.000Z (11 months ago)
- Last Synced: 2025-08-12T02:24:26.759Z (10 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
[Svg sprite](https://github.com/tiknil/svg-sprite) is a tool for creating an svg sprite from a folder of icons.
[Learn more about SVG Sprites and how to use them](https://css-tricks.com/svg-sprites-use-better-icon-fonts/)
## Installation
### Global installation
```
composer global require tiknil/svg-sprite
```
Make sure that the composer binaries directory is in your `$PATH`
You can update svg-sprite to the latest version by running
```
composer global update tiknil/svg-sprite
```
You can now use the `svg-sprite` command anywhere
### PHP project local installation
```
composer require tiknil/svg-sprite
```
You can now invoke the command using `vendor/bin/svg-sprite`
### Usage
```bash
svg-sprite
```
For example, in a laravel project:
```
svg-sprite public/icons resources/views/sprite.blade.php
```
By default, the files names will be used as ID for the icon. You can add a prefix with the -p option:
```
svg-sprite public/icons resources/views/sprite.blade.php -p icons-
```