Dries Vints has created a new package to easily make use of Hero icons in your Laravel Blade views.
By far my most favorite addition to Laravel 7 are the new Blade components. There’s all kinds of cool things you can do with them so I thought I’d share some of them with you.
I’ve built a new package called Blade Heroicons to easily make use of the Heroicons originally made Steve Schoger and Adam Wathan. The packages provides a simple component based flow to include them in your Blade views.
Icons can be used as self-closing Blade components which will be compiled to SVG icons:
<x:heroicon-o-adjustments/>
You can also pass classes to your icon components:
<x:heroicon-o-adjustments class="w-6 h-6 text-gray-500"/>
And even use inline styles:
<x:heroicon-o-adjustments style="color: #555"/>
The Github repo has complete instructions and here is an overview on how this package works
0 comments:
Post a Comment
Thanks