troccoli/blade-health-icons
Laravel Blade components for the Health Icons set. Render crisp, accessible SVG health and medical icons directly in Blade views with simple tags, customizable sizes, colors, and attributes. No manual SVG copying or asset management required.
composer require troccoli/blade-health-icons. No service provider registration or publishing is needed — the icon set is auto-registered with blade-icons.^5.0 and defer this upgrade; if you're planning the Laravel 11 → 12/13 hop anyway, do the framework upgrade first and let this package follow.config/blade-icons.php (only present if you've published it) shows the set name and prefix that determines the Blade tag. The icon names themselves are the Health Icons file names; browse the package's SVG source folder under vendor/troccoli/blade-health-icons/ or the upstream catalogue at healthicons.org before guessing a name.<svg> in a status pill with a component, e.g. <x-health-icon-heart class="h-5 w-5 text-red-600" />. Attributes fall through to the root <svg>, so Tailwind sizing/colour just works. If your install registers the set as a component namespace instead of a flat prefix, the equivalent is <x-health-icons::heart /> — verify against the registered config once, then standardise.<x-ui.health-icon :name="..." :variant="'outline'" /> (or an enum-backed <x-ui.status :status="..."/>) that owns the mapping from your domain vocabulary (critical, allergy, blood-type, pregnancy) to icon names. When v7 renames a glyph, you edit one file instead of grepping 40 views.<x-dynamic-component :component="'health-icon-'.$record->icon" />, or use the blade-icons helper: {{ svg('health-icon-'.$record->icon, 'h-6 w-6 text-slate-500') }}. The helper is the better fit inside loops and @foreach table cells.match mapping. Pair with a PHP enum (Condition::Diabetes->icon()) so the mapping is unit-testable and available to both Blade and JSON resources.php artisan icons:cache to your deploy script if you render many icons across pages, and php artisan icons:clear in local/CI scripts. Both are blade-icons commands and are safe no-ops when nothing is cached.aria-hidden="true"; meaningful ones get role="img" plus an aria-label passed through the component. Bake this into the wrapper so nobody has to remember it.composer update are a solver conflict, not a runtime error. Diagnose with composer why-not troccoli/blade-health-icons 6.0.0. If you maintain packages/apps across both Laravel 11 and 12/13, use a union constraint (^5.0 || ^6.0) rather than forcing everyone forward.composer install, otherwise brand-new icons silently render as nothing.blade-icons merges your class attribute with defaults; the resulting specificity can leave icon sizing at the default w-6 h-6 when you expected your own. When overriding, pass the full size set (h-5 w-5) from the wrapper rather than relying on a single utility to win."text-{$severity}-500") get purged. Safelist the severity palette or use a match returning full literal class strings.currentColor. Health Icons SVGs inherit colour, so text-* (or a parent's colour) drives them — don't try to restyle fills with fill-* on the component unless the specific glyph is fill-based, and check outline vs. filled before theming.blade-icons config and point an additional set path at your own SVG directory, keeping the file name identical, for the rare icon you need to adapt (brand mark, local signage). This is the intended extension point — avoid editing files inside vendor/.data-icon="heart") you control rather than asserting raw SVG output.How can I help you explore Laravel packages today?