codeat3/blade-ikonate
Use Ikonate's customizable SVG icons directly in Laravel Blade views. This package provides simple Blade components for embedding icons with minimal markup, keeping templates clean and icon usage consistent across your app.
Architecture fit. This is a thin, single-purpose adapter: codeat3/blade-ikonate vendors the Ikonate SVG set and registers it as an icon set on top of blade-ui-kit/blade-icons, exposing every glyph as a Blade component (<x-ikonate-home />). There is no build step, no asset publishing, no JS bundle, and no runtime fetch — the package emits inline SVG during server-side render. That is a strong fit for classic Laravel monoliths using Blade + Tailwind and a poor fit for anything else: SPA/API-only services get nothing from it, and email/PDF pipelines actively break on inline stroke SVG.
Integration feasibility. Very high. One composer require, service-provider auto-discovery, and components are immediately available. Three call styles ship (<x-ikonate-*> tag, @svg() directive, svg() helper), all backed by the same base package, so the team can standardize on whichever fits existing conventions. Config publish is optional and only needed for prefix or path changes. Realistic effort is an afternoon for install, wrapper, and first screens — not a sprint line item.
Technical risk. Concentrated and mostly manageable:
blade-ui-kit/blade-icons; the config keys and dynamic-component behavior differ between its v1 and v2. Most integration surprises live there, not in this package.svg/ directory — not the README — is the contract. An upstream Ikonate refresh can rename or drop glyphs, surfacing as render-time SvgNotFound on rarely-hit pages.blade-icons, dropping the vendored SVGs into resources/svg/ikonate and removing the Composer dependency is a config change with zero template edits.Key questions for the team.
blade-icons major are we on, and does our prefix stay ikonate-?Stack fit. Target: Laravel 10–13, Blade templates, Tailwind. Works alongside Livewire but must be watched on icon-heavy reactive lists. Not applicable to Inertia/React/Vue front ends unless icons are duplicated per surface — in that case, standardize on one layer and don't split the design language.
Migration path — incremental, wrapper-first. Do not sweep the codebase. Sequence:
ls vendor/.../svg), and inspect one raw file to confirm currentColor and a viewBox rather than hardcoded dimensions.<x-ui.icon name="search" />) that wraps svg('ikonate-'.$name, ...) and owns class merging plus accessibility defaults (aria-hidden for decorative, role="img" + aria-label for meaningful).w-4 h-4 inline, w-5 h-5 nav, w-6 h-6 feature) as a review rule.Compatibility. Pin "codeat3/blade-ikonate": "~1.7.0". 1.7.0 introduces no API changes, no new icons, and no deprecations relative to 1.6.0, so the routine upgrade path is bump → composer update → php artisan icons:clear → smoke-test one page. Confirm the blade-icons major explicitly with composer show before writing the wrapper; that determines whether <x-dynamic-component> is safe or whether the svg() helper is the portable choice. The helper is the guaranteed-safe option across versions — prefer it in the wrapper.
Sequencing against other work. Two orderings matter:
ikonate- later is a repo-wide find-and-replace. Decide before the first call site ships.php artisan icons:cache must run after composer install --no-dev and after any config publish, adjacent to view:cache. Baking this into the deploy script early avoids a stale-cache incident on the first production release.Deferred work, scoped but not scheduled. (a) Config-driven nav arrays with an icon key to keep icon wiring out of templates; (b) an SVG sprite partial (<symbol> + <use>) for dense tables; (c) the fork/vendor contingency runbook. Each is a small, well-bounded follow-up — none blocks the initial rollout.
Maintenance. Low steady-state: the package itself needs only periodic version bumps, and its release cadence suggests compatibility bumps rather than feature churn. The real maintenance surface is what we build — the wrapper component and the CI icon test. Budget ownership for both explicitly, or the wrapper will rot and call sites will drift back to raw x-ikonate-* tags.
Support. No vendor SLA, no commercial backing, one maintainer. Acceptable here only because the blast radius is cosmetic and the exit is cheap — but the exit must be written down before it's needed. Name an owner, document the vendoring steps, and confirm the svg/ directory can be relocated to resources/svg/ikonate with the same prefix and no template edits. Treat this package as unsuitable for any path where an icon failing to render blocks a customer from transacting.
Scaling. The scaling axis is HTML payload, not request throughput. Server-side rendering plus icons:cache removes per-request parsing cost; it does not reduce bytes on the wire. Watch three surfaces:
wire:model.live on long lists — a 200-row table re-renders hundreds of inline SVGs per keystroke. Debounce, and put spinners on the action rather than per-row.Levers, in order of cost: icons:cache in the deploy pipeline; a sprite partial for the worst offenders; reducing icon density in table rows.
Failure modes and detections.
| Failure | Symptom | Detection / fix |
|---|---|---|
| Icon-name typo | SvgNotFound at render, possibly on an error page |
CI test that renders every icon name referenced in views |
| Upstream rename on upgrade | Same exception, but shipped | Same CI test, run against the upgraded branch |
| Stale icon cache | Renders in tinker, blank in browser | icons:clear + view:clear; audit deploy ordering |
| Tailwind Preflight | Icons drop to their own line in text/buttons | inline-block align-text-bottom or flex items-center on parent — document it once |
| CSP interaction | Inline style blocked | Self-inflicted; keep style= off icon call sites |
| Email / PDF | Stripped or mangled SVG | Scope out up front; use PNGs for mail, test one icon end-to-end before building a PDF template |
| Dense-page bloat | Page weight jump | Measure response size; sprite partial |
None of these are silent if the CI icon test and the deploy ordering are in place on day one.
Ramp-up. Roughly an hour for a Laravel developer familiar with Blade components; the three call styles and the wrapper pattern are self-evident. The time cost is concentrated in the gotchas — Preflight alignment, stroke-width inheritance (verify whether it sits on the <svg> root or per-path before promising weight control to design), and cache behavior. Put those three in the team's component README rather than letting each new developer rediscover them.
Bottom line for the roadmap. This is a small, reversible, single-afternoon decision that unblocks server-rendered surfaces — admin panels, settings, onboarding, dashboards — without adding a build step or a JS dependency. Approve it at the feature-team level with three conditions attached: an internal wrapper component, a CI icon test, and a written fork contingency.
How can I help you explore Laravel packages today?