webicons
Webicons module is here!
Using any icon library (like Boxicons, Free Font Awesome, etc.) is now easier than ever!
Features
With this lightweight module, you can add a Webicons field to any entity (Node, Taxonomy, Paragraphs, etc.) and specify which icon library to use (Boxicons, Font Awesome, etc.). You can insert one or many icons if the field is multiple.
Or... simply, render webicons directly in Twig templates using the 'webicon' function, examples:
Print a lock using the Material Icons library:
{{ webicon('materialicons', {'icon_code': 'lock'}, ['material-icons-outlined']) }}
Print a beer using the Boxicons library:
{{ webicon('boxicons', {'icon_class': 'bx bxs-beer'}) }}
Print a heart using de Fontawesome Free library:
{{ webicon('fortawesome', {'icon_class': 'fa-solid fa-heart'}) }}
By default, it includes 3 fairly comprehensive and free icon libraries.
Instructions
In three simple steps you will be able to add icon field to your entity.
- Add new field to your entity (Node, Taxonomy, Paragraph, etc.): Choose "Webicons Field" type and select the library to use.
- Edit your entity and press in "Select icon" button. Choose your desired icon in the selector dialog.
- Your icon is ready.
That's it, it's that simple!
Similar projects
Unlike other complex or unmaintained modules, Webicons provides an intuitive and straightforward way to insert icons into any entity that allows adding fields.
Supporting this Module
By supporting me on Buy me a coffe!, you're not only helping me continue my work but also contributing to the growth and improvement of Drupal for everyone.
Your support allows me to dedicate more time to developing and maintaining these modules, ensuring they remain reliable and up-to-date with the latest Drupal standards. Whether it's fixing bugs, adding new features, or providing support to fellow developers, your contribution directly fuels the progress of these projects.
Thank you for considering supporting my efforts. Together, we can build a stronger Drupal community and empower more websites with robust, customizable solutions. Let's continue making a positive impact together!