derrabus / twig-awesome-bundle
Inline FontAwesome icons into Twig templates.
Installs: 656
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >= 8.2
- composer-runtime-api: ^2.1
- fortawesome/font-awesome: ^6.6
- symfony/dependency-injection: ^6.4 || ^7
- symfony/http-kernel: ^6.4 || ^7
- twig/twig: ^3.9
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10.67
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^11.1.3
- symfony/filesystem: ^6.4 || ^7
- symfony/framework-bundle: ^6.4 || ^7
- symfony/twig-bundle: ^6.4 || ^7
README
This bundle integrates the icon font Font Awesome 6 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>