owenvoke / blade-fontawesome

A package to easily make use of Font Awesome in your Laravel Blade views.
https://packagist.org/packages/owenvoke/blade-fontawesome
MIT License
167 stars 28 forks source link

Extra styling on icons, like fa-spin and fa-spin-pulse #75

Closed ssssteve closed 4 months ago

ssssteve commented 5 months ago

Description

Tried adding fa-spin as a class, but no change. Is there a way to do this currently or is this a potential new feature? Could extra styling classes be added via another parameter?

Possible implementation

owenvoke commented 5 months ago

As far as I know, applying the class should work. 🤔 However, the CSS or JS behind that functionality is needed as well.

For example, to have a basic spinner, you can use:

<style>
    .fa-spin {
        animation: fa-spin 1.2s linear infinite;
    }

    @keyframes fa-spin {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }
</style>

<x-fas-cloud style="width: 20px; height: 20px;" class="fa-spin"/>