Download the PHP package eminos/statamic-iconify without Composer
On this page you can find all versions of the php package eminos/statamic-iconify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eminos/statamic-iconify
More information about eminos/statamic-iconify
Files in eminos/statamic-iconify
Package statamic-iconify
Short Description A Statamic addon to use Iconify icons in your Statamic site.
License MIT
Informations about the package statamic-iconify
Statamic Iconify
A Statamic plugin for the fantastic Iconify framework.
This plugin gives you an Iconify fieldtype in Statamic where you can search and pick an icon from the huge icon library that Iconify provides.
Installation
Install this plugin using composer.
Features
- Search the library of Iconify icons.
- Over 150 000 open source icons that are loaded on demand.
- Uses Iconify's API. (Always updated icon sets)
- You can choose to only store the selected icon's name, and load it on demand, or store the icon as "SVG data" and use the provided
{{ iconify }}
antlers tag to generate an SVG.
Usage
Depending on how you chose to store the icon, you have a few options for rendering it on the frontend.
Storing only the icon name.
You can use any of Iconifys methods/components to display the icon in the frontend. Here is an example with their web component that fetches the icon on demand through their API.
Read more about how you can use the icons in the Iconify usage documentation.
Storing the icon as SVG Data.
If you store the icon as "SVG Data" you can render the SVG using the provided Antlers Tag. The obvious advantage to store the icon as SVG Data (instead of only the icon name) is that there are no more API calls to Iconify after you have picked the icon. The necessary data to render the icon is stored in your field.
would render:
You can also add other attributes and/or override the icon's default attributes width, height and viewBox.
TODO
Make the search modal nicer.Save the SVG when you pick an icon.Statamic Tag to render the icon (on demand or saved SVG).- More filtering options. For example limit to specific icon vendors or licences.
License
The MIT License (MIT). Please see License File for more information.