Weave Code
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

Symfony UX Icons provides a simple way to use SVG icon packs in Symfony apps. Install popular sets, render icons in Twig or PHP, and manage them consistently across your UI with the Symfony UX tooling and asset pipeline.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Design System Standardization: Unify icon usage across Laravel applications (e.g., admin panels, public sites) to enforce brand consistency and reduce visual fragmentation. Aligns with initiatives to adopt Tailwind CSS, Bootstrap Icons, or custom SVG-based design systems.
  • Developer Productivity: Eliminate manual SVG integration (e.g., copying/pasting <svg> tags) and reduce frontend complexity. Enables faster iteration for features requiring icons (e.g., new UI components, interactive tooltips, or data visualizations).
  • Build vs. Buy: Avoid reinventing icon management systems (e.g., custom SVG sprites, Iconify integration, or Font Awesome licenses) when a lightweight, PHP-native solution suffices. Reduces technical debt for icon-related tasks.
  • Roadmap Acceleration: Fast-track icon-heavy features (e.g., navigation menus, dashboards, or marketing pages) without blocking on frontend dependencies. Integrates seamlessly with Laravel Livewire, Inertia.js, or Alpine.js for dynamic UIs.
  • Performance Optimization: Leverage SVG scalability and local file caching to improve load times vs. icon fonts or remote CDNs. Supports critical icon inlining for above-the-fold content.
  • Multi-Template Support: Enable hybrid Blade/Twig workflows (e.g., Twig for emails/API responses, Blade for views) without icon duplication. Useful for Laravel SaaS products with diverse template needs.

When to Consider This Package

Adopt When:

  • Your primary template engine is Twig (or you’re open to adopting it for icons).
  • Icons are static but numerous (e.g., 30+ icons across templates), making manual SVG inclusion impractical.
  • You need server-side icon rendering (e.g., dynamic icons based on user roles, data, or A/B tests).
  • Performance is critical, and you want to avoid CDN dependencies or icon font bloat.
  • Your team lacks frontend expertise but needs a Twig-friendly solution.
  • You’re using Symfony UX components (e.g., Turbo, Stimulus) and want to standardize on the ecosystem.
  • Icons require integration with Laravel’s caching system (e.g., for remote SVGs).

Look Elsewhere If:

  • Your stack is Blade-only and you lack Twig integration plans (though workarounds exist).
  • Icons require advanced interactivity (e.g., animations, hover effects) best handled by Font Awesome, Lottie, or CSS/JS libraries.
  • You need icon search/filtering (e.g., for a design tool) → evaluate Iconify or Tabler Icons.
  • Self-hosting is mandatory, and remote SVGs are prohibited (though local SVGs are fully supported).
  • Your frontend is heavily decoupled (e.g., Jamstack, static sites) and icons are managed client-side.
  • You require PNG/WEBP fallbacks for legacy browsers (SVG-only by default).

How to Pitch It (Stakeholders)

For Executives:

"This package lets us deliver scalable, consistent icons across all web apps without bloating frontend code or relying on third-party services. It’s a 10-minute setup that saves dev time on repetitive SVG work—ideal for rapid iteration on dashboards, marketing sites, or internal tools. Since it’s MIT-licensed and Symfony-backed, it’s a low-risk way to standardize our visual language while improving performance. For example, replacing Font Awesome with self-hosted SVGs could reduce bundle size by 30% and eliminate CDN dependencies."

Key Outcomes:Faster development (no manual SVG integration). ✅ Better performance (SVGs are lightweight and cacheable). ✅ Design consistency (enforce brand guidelines via Twig components). ✅ Future-proof (integrates with Symfony UX ecosystem).


For Engineering:

*"Symfony UX Icons gives us Twig-native SVG rendering with zero JS overhead. Here’s why it’s a great fit for Laravel:

  • Local Files Only: No dependency on external CDNs (unlike Font Awesome). Self-hosted SVGs mean no surprise latency or licensing costs.
  • Dynamic Icons: Render icons conditionally (e.g., {% if user.is_admin %}{{ ux_icon('admin') }}{% endif %}) without frontend logic.
  • Design System Ready: Pair with Tailwind/Sass for theming (e.g., fill-current for dynamic colors). Example:
    {{ ux_icon('mdi:check', { class: 'text-green-500 w-5 h-5' }) }}
    
  • Future-Proof: Integrates with Symfony’s UX components (e.g., Turbo, Stimulus) for real-time UIs.
  • Performance: SVGs are scalable and lightweight. For remote SVGs, we can cache them via Laravel’s Cache facade.

Tradeoffs:

  • Twig Dependency: Requires Twig setup (but works alongside Blade via @twig directives).
  • No Native Blade Support: Need a helper class (e.g., Icon::render()) for Blade-only projects.
  • Remote SVG Risks: XXE attacks if not sanitized (mitigate with whitelisting and caching).

Proposed Approach:

  1. Start with local SVGs in /resources/svg/ and Twig templates.
  2. Add remote SVG caching for CDN-hosted icons (e.g., Material Design Icons).
  3. Build a helper class to abstract Twig calls for Blade users.
  4. Phase out legacy icon systems (e.g., Font Awesome) incrementally."*

For Designers:

*"This package lets us control icons at the design level while developers handle the heavy lifting. Here’s what you get:

  • SVG Precision: Edit icons in Figma/Illustrator and export directly to /resources/svg/.
  • Consistent Styling: Use Twig to apply classes (e.g., fill-current for theming) or inline styles.
  • Dynamic Variations: Show/hide icons based on user roles or data (e.g., admin-only icons).
  • No Font Limitations: Unlike icon fonts, SVGs support complex shapes and gradients without workarounds.

Example Workflow:

  1. Design icons in Figma → Export as SVGs.
  2. Place SVGs in /resources/svg/icons/ (e.g., home.svg, user.svg).
  3. Use in Twig:
    {{ ux_icon('icons/home', { class: 'text-blue-600' }) }}
    
  4. Reuse across templates without duplication.

Tools to Pair With:

  • Tailwind CSS: Style icons with utility classes (e.g., w-6 h-6).
  • Laravel Mix: Optimize SVGs (e.g., minification, spriting).
  • Figma Plugins: Auto-generate Twig templates from designs."*
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.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views