codeat3/blade-clarity-icons
codeat3/blade-clarity-icons is a Laravel Blade package for using Clarity Icons in your views. It provides simple Blade components to render any Clarity icon as inline SVG, making icons easy to add, style, and customize in PHP applications.
Architecture fit. codeat3/blade-clarity-icons is a view-layer-only dependency: one auto-discovered service provider, an optional config file for prefix/icon-set selection, and a Blade component namespace (<x-clarity-*>) that compiles inline SVG at render time. It has no database, queue, auth, middleware, route, or asset-pipeline footprint, and ships no runtime JavaScript. From a TPM standpoint this is the most favorable class of dependency to own: it cannot introduce a runtime failure mode in a request path, cannot hold state, and cannot affect data integrity. It fits any Laravel application rendering Blade server-side, including Livewire views that still compile Blade components.
It is a poor fit for three cases worth screening for explicitly: API-only services, Inertia/SPA front-ends that render icons client-side (the components never execute), and applications already standardized on blade-ui-kit/blade-icons with a Clarity set registered. In the last case, running both creates overlapping component namespaces and ambiguous resolution order — a defect class that surfaces only in production and is expensive to diagnose. Architectural decision to record in the ADR: this package is the single icon-component provider for Blade surfaces, or it is not adopted at all.
Integration feasibility. High. One composer require, no configuration publish, no migrations, no environment variables, no credentials, no build step. For a developer fluent in Blade components, delivery effort is measured in hours. The realistic TPM cost is not engineering time — it is the small amount of governance work around conventions (naming, sizing, accessibility) that would be required with any icon solution and is merely made cheap here.
Technical risk. Low but non-zero, concentrated in five areas:
Key questions. These gate adoption and should be answered in priority order:
composer.json constraint widen to include Laravel 13 while retaining 10/11/12, or does it shift and drop older majors? This single fact determines whether teams pin ^1.10 or upgrade in place, and therefore the entire rollout plan.Stack fit. Appropriate for Laravel 10+ applications rendering Blade server-side markup. The strongest fit is internal, admin, and back-office surfaces where icons are decorative furniture at volume; also Clarity-aligned products where icon vocabulary is a solved problem rather than a differentiator. The weakest fit is brand-critical customer-facing surfaces, where a curated third-party icon language becomes a design-direction constraint rather than a shortcut, and any non-Blade front end where the components never render.
Migration path. Greenfield adoption is genuinely trivial: require the package, optionally publish config to set a prefix, start using <x-clarity-*> tags. Brownfield adoption should not reference <x-clarity-trash> directly in templates. Route everything through a single semantic wrapper — <x-icon name="delete" /> — and treat that as a delivery requirement, not a code-style preference. The wrapper is the central de-risking move of the entire engagement: it decouples application templates from the vendor's icon vocabulary, absorbs component renames on version bumps, enforces consistent sizing and accessibility defaults in one place, and converts a potential fork-or-replace project into an afternoon of work. Replace ad-hoc inline SVG partials and icon-font <i> tags incrementally behind it; do not attempt a big-bang sweep.
Compatibility. Verify three things before rollout: (a) whether the 1.11.0 constraint widened or shifted, which determines pinning strategy; (b) the PHP floor against the runtime matrix; (c) that the prefix/namespace in the installed version's README matches what pilot templates assume. Absent a widened constraint, teams on Laravel 10–12 pin ^1.10 and carry a known future upgrade cost.
Sequencing. Five steps, in order:
composer.json to confirm constraint widening and PHP floor — this decides pinning versus upgrading before any code is written.view:clear then view:cache to surface component-resolution and compile errors early rather than in staging.fill="currentColor" — the usual breakage class on a version bump.Maintenance. Near-zero routine cost: no config drift, no runtime state, no scheduled jobs, no asset pipeline to keep green. The single recurring line item is upgrade hygiene — a version bump is required each time the host application moves Laravel majors, and someone must watch whether the package lags. Pin to a caret range (^1.11 on Laravel 13; ^1.10 on older majors), never dev-main, and record the framework-major dependency explicitly in the platform upgrade runbook so it is not discovered mid-migration.
Support. Community-maintained by effectively one contributor, with no SLA and no escalation path. That is acceptable for cosmetic UI assets and unacceptable for anything functionally critical — a distinction worth stating in the ADR so the decision is not re-litigated at every review. Two cheap mitigations: keep all usage behind the wrapper so replacement is contained, and, if risk appetite is low, vendor the generated SVG components into the repository outright. Supply-chain review should document the SVG audit as completed rather than assumed.
Scaling. Effectively free at runtime, and better than the common alternative. Inline SVG means no network hop, no font loading, no FOIT/FOUT, and no third-party availability dependency — a genuine advantage over CDN-hosted icon fonts and worth citing explicitly when justifying adoption. Cost scales with page size (inlined markup) and with Blade compilation at deploy. For icon-dense pages, prefer a sprite sheet or partial caching, and validate against the heaviest representative page rather than an average one.
Failure modes. Ranked by realistic damage:
Ramp-up. Very fast. Any developer already writing Blade components is productive in under an hour; the learning content is the wrapper convention, not the package. Budget that hour for conventions — sizing scale, aria-hidden versus aria-label/<title>, and where the wrapper lives — and make those calls once centrally rather than per feature. That is the one product-quality decision this package does not make for you, and it is the one worth a TPM's attention.
How can I help you explore Laravel packages today?