stefangalescu/statamic-heroicons
The Statamic Heroicons addon brings the complete Heroicons SVG set to your Statamic site, with a fieldtype and Antlers tag so you can drop crisp, scalable icons into templates and the control panel quickly.
This release (v3.3) is primarily a compatibility and hardening release: the addon now supports Statamic 6, is CI-tested against Laravel 12 on PHP 8.2–8.5, and fixes several edge cases in tag rendering. There are no deprecations or breaking changes called out, so an existing v3.x install should upgrade cleanly — you mainly gain Statamic 6 support and more forgiving rendering.
First steps:
composer require the addon (or composer update <vendor>/<package> if already installed), then verify the installed version is 3.3.php artisan optimize:clear, plus php artisan statamic:stache:clear if icon registration is cached in your setup).Inline in Antlers partials. The dominant usage is rendering an icon directly in a template, passing the icon name and your utility classes. Keep the markup in a small reusable partial (e.g. partials/icon.antlers.html) that takes the name, variant, and class as parameters, so sizing and aria-hidden behaviour live in one place instead of being repeated across templates.
Dynamic icons from content. The common real-world pattern is an icon name stored in a field (a select, a Bard/Replicator set, or a dedicated icon fieldtype) and passed to the tag as a variable. Because v3.3 hardened rendering when the variant or icon input is missing, a field that's empty or unset now yields no output rather than an error — pair that with an {{ if }} guard when you need a fallback icon.
Wildcard and camel-case icon names. v3.3 preserves camel-case names when resolving wildcard-style tags. This matters for the handful of Heroicons whose names are genuinely camel-cased (e.g. arrowUpTray, arrowDownOnSquare). If you generate tag strings dynamically, don't run them through a strtolower() or slug helper — you'll silently break those icons.
Case-insensitive parameters. Parameter names are matched case-insensitively, so class and Class both work. Pick one convention (lowercase) and stick to it; mixed casing in a codebase is a readability trap, and third-party snippets copied from the docs may use a different case than your house style.
Blade-heavy projects. Where you're rendering through Blade rather than Antlers, keep the icon markup in a Blade component that wraps the addon's output, so both template engines share one sizing/aria convention. Avoid duplicating icon markup between the two.
Composition. Icons almost always sit inside a button, link, or input group. Set aria-hidden="true" on decorative icons via your shared partial, and use aria-label on the parent control. Pass those attributes through the tag rather than concatenating them into the SVG yourself.
outline may be absent in mini. Verify against the upstream Heroicons set for the exact variant you're requesting.<use> reference or caching the rendered fragment rather than repeating full SVG paths.How can I help you explore Laravel packages today?