silarhi/ux-icons-js-bundle
Symfony bundle that plugs Iconify's JavaScript runtime into Symfony UX Icons, letting you render any of Iconify's 200,000+ icons on demand—no per-icon SVG imports or manual icon sets—via a single lightweight script that loads icons at runtime in your Twig templates.
var/icons/), per-icon module splitting (loaders.js), the fetch/cache primitive (loadIcon(loaders, name)), and framework bindings (UXLazyIcon). This is a "buy" argument: the remaining in-house work is naming conventions and fallback design, not infrastructure.Adopt when:
fetch-an-SVG hack maintained by one person.Look elsewhere when:
Open questions to resolve before committing: cache headers and long-term hashing on the per-icon modules; fallback dimensions and whether they match the final glyph to avoid layout shift (CLS); behavior on failed loads and whether errors are observable; accessibility of the fallback (does it announce anything, is it aria-hidden); and how icon names are validated, since a name originating from user or tenant data becomes a fetch target.
For executives: This release removes a blocker on customization. We can now let customers, tenants, or content authors choose icons at runtime — branding, navigation, dashboards — without shipping every icon in the product or funding a custom loader. The commercial value is in enabling white-label and personalization work already on the roadmap; the engineering cost is adoption and a small amount of fallback design, not new infrastructure. The main constraint to state plainly is that this is for secondary and content-driven UI, not the primary app chrome, so it does not replace our core icon strategy — it extends it.
For engineering: v0.2.0 adds runtime icon resolution. The dump emits one module per icon plus var/icons/loaders.js; loadIcon(loaders, name) fetches a single icon; UXLazyIcon wraps this for React and Vue with a fallback during load. The work on our side is convention, not construction: pick the fallback, confirm it reserves the right box to avoid layout shift, verify cache headers and hashing on the emitted modules, decide error behavior, and confirm icon names arriving from user or tenant data are validated before they become fetch targets. Budget a short spike on an existing dynamic-name surface before we generalize it.
Recommendation: Adopt for the specific class of surfaces where icon names come from data, contingent on the caching and fallback-dimension checks above. Keep static, critical-path iconography on the existing build-time approach.
How can I help you explore Laravel packages today?