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.
Statamic support
| Statamic version | Addon version | Addon branch |
|---|---|---|
| Statamic 5 | 1.x |
1.x |
| Statamic 6 | 2.x |
main |
Features
- Search the library of Iconify icons.
- Over 200,000 open source icons loaded on demand.
- Uses Iconify's API (always updated icon sets).
- Filter by icon set, category, or license — at the global config level or per-field.
- Global config file to lock down allowed icon sets site-wide.
- Dark mode support.
- Store as icon name (load on demand) or SVG data (no API calls on frontend).
- Antlers tag to render stored SVG icons.
Configuration
Publish the config file:
This creates config/statamic-iconify.php where you can set global restrictions:
Field-level configuration
Each Iconify field in your blueprints can further narrow the available icons:
- Icon Sets — Multi-select dropdown of available icon sets (filtered by global config)
- Category — Single select dropdown of icon set categories
- Licenses — Multi-select dropdown of license types
- Store as — Icon name or SVG data
Field-level settings can only narrow within what the global config allows, never widen.
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 Iconify's 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 advantage is that there are no API calls to Iconify after you have picked the icon — the data to render the icon is stored in your field.
renders:
You can also add attributes and/or override the icon's defaults:
Testing
License
The MIT License (MIT). Please see License File for more information.