codeat3/blade-unicons
A Laravel Blade component package that makes it easy to use Unicons icons directly in your Blade views with simple, expressive tags—no manual SVG copying required. Lightweight, clean syntax, and perfect for quickly adding crisp, scalable icons to any Laravel app.
Architecture fit. codeat3/blade-unicons is a leaf-level presentation dependency: a Composer package that registers a Blade component namespace (<x-unicons-* />) and delegates rendering to blade-ui-kit/blade-icons. It renders inline SVG at request time. It touches no domain logic, no data model, no public API contract, and introduces no client-side runtime. Architecturally this is as low-blast-radius as a dependency gets — it can be added to a single layout partial and removed without touching anything upstream of the view layer. The important framing for stakeholders: this package is not the decision. The decision is whether Unicons (Iconscout's line/solid/monochrome/thinline set) becomes the product's icon language, and whether we want icon assets managed by Composer rather than committed to resources/. The package is a one-file, reversible way to test both.
Integration feasibility. Genuinely a five-minute first render: composer require, auto-discovery registers the provider, no npm, no build step, no asset publishing. The one non-obvious constraint is that the authoritative icon inventory is the vendor directory (resources/svg/), not the Unicons marketing site — filenames map to component names, and style variants may be suffixed rather than cleanly namespaced. That means "which icons do we actually get" is answered by ls, not by the vendor's website, and it must be answered before design signs off on a specific icon. Effort is hours, not weeks, but the honest estimate includes one hour for the project-owned wrapper (below) plus a design review pass.
Technical risk. Four risks, ranked by what actually bites:
<x-icon name="..." /> wrapper registered once, so zero views reference the vendor component. If the package dies, we rewrite one file and vendor the SVGs. Keep that exit documented in the repo README, not in someone's head.blade-icons constraint (^1.0 vs ^2.0 is the thing to verify, not the changelog). If we already run Heroicons or another blade-* set, we now have a second consumer of that shared dependency — a future blade-icons major bump becomes a multi-package conflict at the worst possible moment. Read composer.json, pin exactly (1.10.*), and do not accumulate icon sets "because they're free."<svg> appears.Not risks: sanitization (bundled SVGs are trusted vendor files — only becomes an XSS vector if someone points the icon path at user uploads, which we should explicitly forbid), and prefix collisions (x-unicons-* won't collide with other sets).
Key questions.
composer.json actually pin for blade-icons and the Laravel/PHP floor? Does 1.10.0's Laravel 13 bump conflict with anything we run today?blade-icons consumer in the dependency graph, and if so, has anyone verified constraint compatibility?icons:cache needs a Dockerfile step.Stack fit. Adopt only where the stack is Laravel with server-rendered Blade. That covers admin panels, Livewire views, Filament-adjacent custom pages, marketing pages, and PDF/server-side export templates — contexts where icon fonts and JS are unreliable, which is the package's real technical differentiator versus <i class="fa-...">. It is not a fit for Inertia/Vue/React front ends (import Unicons from npm there) or for HTML email (Gmail and Outlook strip inline <svg>; use PNGs or CSS background images). Getting this scoping decision explicit up front is the single highest-value thing a TPM does here — the failure mode is one team adopting it for a surface where it structurally cannot work.
Migration path. Deliberately incremental and reversible:
<i class="fa-..."> tags or hand-pasted SVG partials. Small enough to verify visually in a review, large enough to prove the workflow end to end.<x-icon name="..." /> using x-dynamic-component) before the second use case, not after. This is the whole abandonment mitigation and costs about an hour.config/icons.php) so views reference project vocabulary (delete, settings) rather than vendor icon names. This gives you an enumerated list of icons actually in use and makes a provider swap a one-file diff.Because each step is a template edit, rollback is a git revert — no data migration, no infrastructure change, no user-visible state.
Compatibility. Verify three things directly rather than trusting release notes: the blade-icons constraint in composer.json, the PHP/Laravel floor, and whether the style variants we need actually ship under the names design expects (check the vendor SVG directory). The 1.10.0 release is a Laravel 13 compatibility bump — a positive maintenance signal, but a capability-neutral one; it says nothing about blade-icons v1 vs v2, and that is the constraint most likely to cause a future conflict. Also verify behaviour under our deployment model: icons:cache writes a manifest to disk and will throw on a read-only filesystem, so it belongs in the Dockerfile after composer install, not in a boot script.
Sequencing. Run these as gates, not parallel tracks:
blade-icons conflict, pin exactly.Steps 1–3 are days. Steps 4–5 are days. The pilot should never be scheduled as its own epic; it lives inside a design-system workstream as a prerequisite, not a deliverable.
Maintenance. Low and mostly concentrated in one place. Routine upkeep is composer update plus re-running icons:cache whenever the icon inventory changes — miss that and new icons 404 silently, so wire it into the build pipeline rather than a human checklist. The wrapper and alias map absorb vendor churn: an upstream rename becomes a one-file diff instead of a find-and-replace across views. The real maintenance cost is attention: a single-maintainer package with zero dependents means nobody else is filing the bugs we'll hit, so we own the upgrade testing. Budget a small recurring slot for version bumps and a re-read of composer.json at each one.
Support. No SLA, no security contact, no vendor to escalate to. Internally, support burden is near zero because failure modes are visual and loud (icon missing) rather than functional and quiet (data corruption). That is a favourable support profile for a UI dependency — the worst case is a broken glyph, not a broken page. The exception is the alias map, where a bad key fails silently; the CI test closes that gap and is worth writing precisely because no upstream support exists to catch it for us.
Scaling. Two dimensions:
icons:cache removes per-request filesystem lookups, which matters on icon-dense pages.<path> data. This is measurable and bounded, not a scaling wall — measure the delta on a representative page, and if it's material the escape hatch is a sprite sheet (<symbol> + <use href="#...">) behind the same <x-icon> wrapper, so no view changes.Scaling the team is the softer constraint: a design-system with one icon set is easy to onboard onto; a repo with three blade-* packages is not. Standardize on one.
Failure modes. Ranked by likelihood and impact:
| Failure | Symptom | Detection | Mitigation |
|---|---|---|---|
| Vendor rename / icon removed upstream | One page renders no icon | CI icon-surface test | Alias map + wrapper localizes the fix |
| Alias map typo | Silence or fallback glyph | CI icon-surface test (only way) | Test every aliased name |
icons:cache stale after update |
New icons 404 silently | Staging visual pass | Build-pipeline step, not a checklist |
icons:cache on read-only FS |
Deploy/boot throws | First immutable-container deploy | Run at image build, not boot |
blade-icons constraint conflict |
Composer resolution failure mid-upgrade | composer.json review |
Pin exactly; verify at adoption |
| License challenge post-rollout | Forced reversal on live surfaces | Legal review | Gate before customer-facing |
| Email template usage | Icons vanish in Gmail/Outlook | Manual mail client test | Scope rule: no <x-icon> in mail views |
| Package abandoned | No upstream fixes | Ongoing signal | Wrapper + vendored SVGs = one-file exit |
The abandonment scenario is well-contained: icons are static assets, so the exit is a find-and-replace plus a wrapper rewrite, not a re-architecture. That property is what makes the low adoption numbers tolerable for a pilot — but only if the wrapper exists.
Ramp-up. Effectively zero for any Laravel developer: <x-icon name="home" class="h-5 w-5" /> is self-teaching, and sizing/colour come free from Tailwind classes and currentColor. The knowledge that actually needs transferring is small but non-obvious: (a) the vendor SVG directory is the icon inventory, not the website; (b) always go through the wrapper, never <x-unicons-* /> directly; (c) decorative icons get aria-hidden="true", meaningful icons get role="img" and a label — and the wrapper should default to hidden so the correct choice is the default; (d) no <x-icon> in email templates. That's a half-page README and one code-review habit. Ramp-up cost is dominated by the design review, not by engineering.
How can I help you explore Laravel packages today?