Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.68 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.68 KB

Latest Stable Version License

Font Awesome Blade

A collection of Laravel Blade Components to make it dead simple to use the Font Awesome icons in Laravel.

Prerequisites

This package assumes that you are using Font Awesome via a package manager.

Installation

composer require devlop/fontawesome-blade

Configuration

By default this package will assume you are using the @fortawesome/fontawesome-free.

If you are using any other version, publish the configuration and change the path accordingly.

php artisan vendor:publish --provider="Devlop\FontAwesome\FontAwesomeBladeServiceProvider"

Usage

Each of Font Awesome's different styles are available as separate components, they all accept the same name argument for specifying which icon to display.

<x-fa::brands name="fa-laravel" />

<x-fa::solid name="fa-0" />

<x-fa::regular name="fa-2" />

<x-fa::light name="fa-5" />

<x-fa::thin name="fa-0" />

<x-fa::duotone name="fa-elephant" />

You also need to import the Font Awesome CSS into your CSS build to get the icons to display like they would if you were using the Font Awesome JS method.

@import '@fortawesome/fontawesome-pro/css/svg-with-js.css';