davidhsianturi/blade-bootstrap-icons
Laravel package that brings Bootstrap Icons to Blade. Use simple Blade components to render SVG icons with customizable size, class, and other attributes. Quick to install, lightweight, and ideal for consistent icon usage across your app.
Pros:
Cons:
davidhsianturi/blade-bootstrap-icons), register the service provider, and use @icon('name') in Blade.php artisan view:clear), though this is standard for Blade.<i> tags or a custom Blade component) suffice for your icon needs?@icon() directives to test rendering.<i class="bi bi-...">).<i> tags as a temporary fallback during migration.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.15.0/font/bootstrap-icons.css">
composer require davidhsianturi/blade-bootstrap-icons
Register the service provider in config/app.php.<i class="bi bi-heart"></i>
With:
@icon('heart')
view:clear), or Blade syntax errors.@dd(@icon('heart')) to inspect rendered output.preload or self-hosting).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bootstrap Icons CDN fails | Icons render as empty boxes | Self-host icons or use fallback <i> tags. |
| Package update breaks icons | Icons render incorrectly | Test updates in staging; roll back if needed. |
| Blade cache not cleared | Old icons persist | Add view:clear to deployment scripts. |
| Icon name typo | Broken icon rendering | Use IDE autocomplete or maintain a cheat sheet. |
@icon() usage and common icon names..icon-lg).@icon() directives render correctly (e.g., screenshot comparison).- name: Test Blade Icons
run: php artisan view:test --icon-rendering
How can I help you explore Laravel packages today?