This bundle for Symfony Framework, allows you to add FontAwesome SVG icons, inline in your html.
It is released under MIT license.
To install this package, you can just use composer:
$ composer require armin/font-awesome-bundle
This will also require the fortawesome/font-awesome package.
Please make sure, you've registred the bundle correctly in your project's config/bundles.php.
There is no configuration to be made.
vendor/ to public/Once this bundle is installed, you can use the following Twig function:
{{ fa("smile-beam") }} == {{ fa("fas smile-beam") }}
{{ fa("far smile-beam") }}
{{ fa("far smile-beam", {size: 256, color: '#d50', class: 'card shadow'}) }}
It is recommended, to add some default CSS.
All icons in html output, will have got the class fa-svg-icon set:
.fa-svg-icon {
width: 32px;
height: 32px;
fill: #444;
}
When you provide options, like size or color, inline styles will overwrite the default CSS.
If you like this Symfony bundle, you are invited to donate some funds to support further development. Thank you!
For help please visit the issue section on Github.
How can I help you explore Laravel packages today?