|
| 1 | + |
| 2 | + |
| 3 | +<br> |
| 4 | +<h1 align="center"> |
| 5 | +Laravel Primer Octicons |
| 6 | +</h1> |
| 7 | +<p align="center"> |
| 8 | + A Laravel package to integrate GitHub's Octicons into your Laravel project effortlessly. This package allows you to use Octicons directly in your Blade templates with ease. |
| 9 | +</p> |
| 10 | + |
| 11 | + |
| 12 | +## About |
| 13 | + |
| 14 | +Octicons are a scalable set of icons handcrafted by GitHub. They are designed to be highly legible, even at small sizes, and are perfect for adding a consistent visual language to your web projects. |
| 15 | + |
| 16 | +GitHub Repository: [primer/octicons](https://github.com/primer/octicons) |
| 17 | +Official Site: [Octicons](https://primer.style/octicons) |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +You can install the package via Composer: |
| 22 | + |
| 23 | +```bash |
| 24 | +composer require devzkhalil/laravel-primer-octicons |
| 25 | +``` |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +After installing, you can use the Octicons in your Blade templates like this: |
| 30 | + |
| 31 | +```blade |
| 32 | +<x-icon::thin.arrow-up-left width="16" height="16" fill="white" /> |
| 33 | +<x-icon::bold.arrow-up-left width="16" height="16" fill="white" /> |
| 34 | +
|
| 35 | +<x-icon::thin.download width="24" height="24" fill="white" /> |
| 36 | +<x-icon::bold.download width="24" height="24" fill="white" /> |
| 37 | +``` |
| 38 | +## Icon Sizes and Parameters |
| 39 | + |
| 40 | +In this package: |
| 41 | + |
| 42 | +- GitHub `16px` icons are referred to as `bold`. |
| 43 | +- GitHub `24px` icons are referred to as `thin`. |
| 44 | + |
| 45 | +### Component Parameters |
| 46 | + |
| 47 | +**For Bold Icons (16px):** |
| 48 | +- `width` is optional; the default size is `16px`. |
| 49 | +- `height` is optional; the default size is `16px`. |
| 50 | +- `fill` is optional; the default color is `black`. |
| 51 | + |
| 52 | +**For Thin Icons (24px):** |
| 53 | +- `width` is optional; the default size is `24px`. |
| 54 | +- `height` is optional; the default size is `24px`. |
| 55 | +- `fill` is optional; the default color is `black`. |
| 56 | + |
| 57 | +### Finding Icon Names |
| 58 | + |
| 59 | +To find the name of an icon: |
| 60 | +1. Visit the official Octicons site: [Octicons](https://primer.style/foundations/icons). |
| 61 | +2. Locate and copy the name of your desired icon. |
| 62 | +3. Use the icon in your Blade templates with the appropriate size: |
| 63 | + |
| 64 | +For `16px` icons (bold): |
| 65 | + ```blade |
| 66 | + <x-icon::bold.your-icon-name /> |
| 67 | + ``` |
| 68 | +For `24px` icons (thin): |
| 69 | + ```blade |
| 70 | + <x-icon::thin.your-icon-name /> |
| 71 | + ``` |
| 72 | + |
| 73 | +## Publish Components |
| 74 | + |
| 75 | +Publish the components file with the following command: |
| 76 | + |
| 77 | +```bash |
| 78 | +php artisan vendor:publish --tag=primer-octicons |
| 79 | +``` |
0 commit comments