Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ux Icons Laravel Package

symfony/ux-icons

Render local and remote SVG icons in Twig with the ux_icon() function or the twig:ux:icon component. Pull icons from any registered pack, like mdi:check, and style them inline with classes. Browse the full icon set and live demo at ux.symfony.com/icons.

View on GitHub
Deep Wiki
Context7

Renders local and remote SVG icons in your Twig templates.

Frequently asked questions about Ux Icons
Can I use symfony/ux-icons in a Laravel application?
Not natively. It is a Symfony bundle (UXIconsBundle) that relies on the Symfony kernel, a config tree loaded from config/packages/ux_icons.yaml, and Symfony DI container service registration, none of which exist in Laravel. The genuinely reusable core is the IconRenderer, IconRegistry and Iconify fetch/sanitize pipeline, which you can register manually in a Laravel ServiceProvider. Expect to build and own a thin adapter package, and pin exact versions since parts of that core may be marked @internal.
How do I install and configure symfony/ux-icons in Laravel?
Run composer require symfony/ux-icons, but do not expect bundle auto-discovery to do anything useful. You need to bind IconRenderer and IconRegistry in a service provider, adapt a PSR-6 CacheInterface to Laravel's cache store, and mirror the ux_icons.yaml options such as the default icon pack and local icon directories into a config/icons.php file. Teams that have done this estimate roughly two to four weeks of work including tests, so treat it as building a small package rather than installing a dependency. If that cost is unacceptable, a Blade-native icon package is the pragmatic choice.
Does the ux_icon() Twig function work inside Blade templates?
No. Both ux_icon() and the <twig:ux:icon /> component are Symfony UX Twig surface APIs, and the component syntax additionally needs the symfony/ux-twig-component runtime. In Laravel you would expose a Blade component such as <x-icon name="mdi:check" class="w-4 h-4" /> or an @icon directive that calls the renderer directly. Even with rcrowe/twigbridge installed, treat the twig: component syntax as out of scope and standardize on the function or a Blade component.
Which version of symfony/ux-icons fixes the Iconify SVG XSS vulnerability?
CVE-2026-55877 covers XSS via unsanitized Iconify SVG bodies and local icon files, and it is fixed in 3.2.0 and 2.36.1. Pin at least those versions as a hard gate and run composer audit in CI so a downgrade cannot slip through. The fix keeps style blocks for theming but strips event handlers, CDATA, processing instructions and javascript: or data:text/html hrefs, so verify those semantics match your CSP before relying on it.
Does symfony/ux-icons support Laravel 10 or 11, and which PHP and Symfony versions do I need?
The package does not target Laravel versions at all; what matters is transitive Symfony constraints. Version 3 requires PHP 8.4 and Symfony 7.4, while 2.x supports PHP 8.2 with Symfony ^6.4. Pulling Symfony 7.4 components into a Laravel 10 or 11 app can collide with Laravel's own symfony/* constraints, so resolve the dependency graph in a short spike before committing to either branch.
Is there a Laravel-native alternative to symfony/ux-icons?
blade-ui-kit/blade-icons is the usual answer for Blade shops. You lose the SVG sanitizer and the on-demand Iconify fetching story, but you avoid all adapter risk and get a package designed for Laravel's view layer. If your icon needs are mostly local SVG files with classes, it covers the same ground with far less integration work.
How do I render named Iconify icons like mdi:check in Laravel and cache them for production?
Wire the IconRegistry and Iconify fetcher into a service provider, point them at a PSR-6 adapter over Laravel's cache repository, and call them from a Blade component. Because there is no Symfony cache:warmup hook, add an Artisan command that pre-fetches and caches your icon set during deploy. Better still, self-host and lock all icons locally so production makes no runtime Iconify calls, which removes API latency and outage risk and lets you control payload size where an icon repeats dozens of times per page.
Is symfony/ux-icons actively maintained, and why does it have so few GitHub stars?
It is backed by the Symfony core team with a steady release cadence and prompt security backports to the 2.x line. The low star count and zero dependents are misleading because the repository is a read-only sub-tree split of the symfony/ux monorepo, so issues, pull requests and real usage live upstream. Judge it on core-team backing and release history rather than on the split repo's metrics.
Are Iconify icon licenses a problem for a Laravel app?
Potentially yes. Iconify aggregates third-party icon sets with mixed licenses ranging from MIT and Apache-2.0 to CC-BY and share-alike terms, and fetching them remotely does not launder the license. Do a legal review per set you enable, especially if you redistribute the application or its assets, and record the chosen sets and versions in your repository.
How do I test icon output and keep it stable across symfony/ux-icons upgrades?
Make snapshot and HTML-diff assertions attribute-order tolerant, because output can change between minor releases. Version 2.24.0 added xmlns to downloaded icons and broke tests that asserted on exact ux_icon() markup, which is a good example of the risk. Assert on the presence of expected path data and classes rather than the full SVG string, and pin exact versions in composer.json.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel