Giter Site home page Giter Site logo

poldixd / laravel-feather Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 152 KB

Use Feather Icons as a Blade include() or Blade Component in your Laravel application

Home Page: https://packagist.org/packages/poldixd/laravel-feather

License: MIT License

JavaScript 0.61% PHP 2.63% Blade 96.76%
feather icons laravel composer-package svg svg-icons feather-icons

laravel-feather's Introduction

poldixd/laravel-feather

Use Feather Icons as a Blade include() or Blade Component in your Laravel 9.x or 10.x application. This Package uses Feather 4.28.0.

Installation

Simply require poldixd/larave-feather through Composer:

composer require poldixd/laravel-feather

Usage

Include the icon like a Blade template in your view:

<!-- Your Blade view -->
@include('feather::airplay')

<!-- Output: -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>

Optional you can use Blade Components if you're using laravel greater than 7.x.

<!-- Your Blade view -->
<x:feather-activity />

<!-- Output: -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>

You can find a list of all icons on this website.

Using CSS Classes

You can include the icons with css classes.

<!-- Your Blade view -->
@include('feather::airplay', ['class' => 'my-awesome-class my-second-class'])

<!-- or as a blade component -->
<x:feather-activity class="my-awesome-class my-second-class" />

<!-- Output: -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay my-awesome-class my-second-class"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>

Using Style attributes

<!-- Your Blade view -->
@include('feather::airplay', ['style' => 'color: red'])

<!-- or as a blade component -->
<x:feather-activity style="color: red" />

<!-- Output: -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-airplay" style="color: red"><path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon></svg>

License

poldixd/laravel-feather is licensed under the MIT License. The icons in this code are from Feather. It is also licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.