Download the PHP package viewi/icons without Composer
On this page you can find all versions of the php package viewi/icons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package icons
Viewi Icons package
SVG Sprites:
- Has bootstrap icons on board https://icons.getbootstrap.com/
Append prefix bi-
to use the icon. It is necessary in order to avoid conflicts with future icon sprites.
For example, for icon emoji-sunglasses
use bi-emoji-sunglasses
: <Icon name="bi-emoji-sunglasses" />
SVG sprite vs. Font icons
An SVG sprite renders directly into the page (or can be accessed as an asset with a URL). Then, you can use the icon from that sprite. Sprite includes only those icons that you really want to use.
Font icons require you to include links to the font and css, which have all the icons altogether, even if you are not using most of them.
How to use
composer require viewi/icons
In your Viewi config:
Add use Viewi\Icons\ViewiIcons;
Use the package ->use(ViewiIcons::class)
;
Add sprite component IconsSprite
at the beginning of the body
tag in your layout component, for example:
IconsSprite
renders the sprite (or SVG map) with icons that you use.
Package will analyze your source code and include only those icons that you really use.
For example, if you use emoji-sunglasses
icon only, it will render something like this:
Use the icon:
This will render something like this:
Custom class with classList
:
Will render:
Support
We all have full-time jobs and dedicate our free time to this project, and we would appreciate Your help of any kind. If you like what we are creating here and want us to spend more time on this, please consider supporting:
- Give us a star⭐.
- Support me on buymeacoffee
- Follow us on Twitter/X.
- Contribute by sending pull requests.
- Any other ideas or proposals? Please mail me [email protected].
- Feel welcome to share this project with your friends.
License
Copyright (c) 2020-present Ivan Voitovych
Please see MIT for license text