richarddobron / blade-google-material-symbols-300
A package to easily make use of Googles Material Design Symbols (300) in your Laravel Blade views.
Package info
github.com/richardDobron/blade-google-material-symbols-300
pkg:composer/richarddobron/blade-google-material-symbols-300
Requires
- php: ^7.4|^8.0
Requires (Dev)
- ext-dom: *
- ext-fileinfo: *
- blade-ui-kit/blade-icons: ^1.1
- friendsofphp/php-cs-fixer: ^3.2.1
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- phpunit/phpunit: ^9.0|^10.5|^11.0|^12.0
- spatie/phpunit-snapshot-assertions: ^2.0|^3.0|^4.0|^5.0
README
Blade Google Material Symbols
A package to easily make use of Google's Material Symbols in your Laravel Blade views.
For a full list of available icons you can preview them at Material Symbols.
Requirements
- PHP 7.4 or higher
- Laravel 8.0 or higher
Installation
As Material Symbols offers a lot of different styles, you can choose a specific one by using the corresponding package.
composer require richarddobron/blade-google-material-symbols-300
Usage
Icons can be used as self-closing Blade components which will be compiled to SVG icons:
<x-gms:300-fact_check-fill-outlined/>
You can also pass classes to your icon components:
<x-gms:300-fact_check-outlined class="w-6 h-6 text-gray-500"/>
And even use inline styles:
<x-gms:300-fact_check-fill-rounded style="color: #555"/>
Raw SVG Icons
If you want to use the raw SVG icons as assets, you can publish them using:
php artisan vendor:publish --tag=blade-material-symbols-300 --force
Configuration
Blade Material Symbols also offers the ability to use features from Blade Icons like default classes, default attributes, etc. If you'd like to configure these, publish the blade-gms.php config file:
php artisan vendor:publish --tag=blade-material-symbols-300-config
Blade Icons
Blade Material Symbols uses Blade Icons under the hood. Please refer to the Blade Icons readme for additional functionality. We also recommend to enable icon caching with this library.
Then use them in your views like:
<img src="{{ asset('vendor/blade-material-symbols-300/star-fill-outlined.svg') }}" width="10" height="10"/>
Maintainers
Blade Material Symbols is developed and maintained by Richard Dobroň.
License
Blade Material Symbols is open-sourced software licensed under the MIT license.