derrabus / twig-awesome-bundle
Inline FontAwesome icons into Twig templates.
Installs: 1 831
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/derrabus/twig-awesome-bundle
Requires
- php: >= 8.4
- composer-runtime-api: ^2.1
- fortawesome/font-awesome: ^7.1
- symfony/dependency-injection: ^8
- symfony/filesystem: ^8
- symfony/http-kernel: ^8
- twig/twig: ^3.21
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.92.3
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1.33
- phpstan/phpstan-deprecation-rules: ^2
- phpstan/phpstan-phpunit: ^2
- phpstan/phpstan-strict-rules: ^2
- phpunit/phpunit: ^12.5.4
- symfony/event-dispatcher-contracts: ^3.4.2
- symfony/framework-bundle: ^8
- symfony/translation-contracts: ^3.4.2
- symfony/twig-bundle: ^8
README
This bundle integrates the icon font Font Awesome into Twig. But instead of using CSS to render icons on the frontend, the icons are rendered as SVG images directly into the compiled Twig template.
Example
This example renders a flag icon. Please note that you should wrap the icon in a div or similar element in order to adjust its size.
<div style="height: 10em;">{% fa regular flag %}</div>