- How do I install Blade-Zondicons in a Laravel 12 project?
- Run `composer require blade-ui-kit/blade-zondicons` in your project directory. The package supports Laravel 12+ and PHP 7.4+, so no additional Laravel-specific steps are required beyond installation.
- Can I use Blade-Zondicons with Laravel 12’s stacked components?
- Yes, the package is compatible with Laravel 12’s stacked components. You can nest icons directly in Blade views without conflicts, though test nested structures to ensure rendering behaves as expected.
- What if I need to customize icon styles or sizes globally?
- Publish the config file with `php artisan vendor:publish --tag=blade-zondicons-config` to set default classes, attributes, or sizes for all icons. This leverages Blade Icons’ built-in configuration system.
- Does Blade-Zondicons support caching for better performance?
- Yes, the package relies on Blade Icons, which supports caching. Enable it by following the [Blade Icons caching guide](https://github.com/blade-ui-kit/blade-icons#caching) to reduce SVG rendering overhead in production.
- How do I use raw SVG files from Zondicons in my project?
- Publish the SVG assets with `php artisan vendor:publish --tag=blade-zondicons --force`, then reference them directly in your Blade views or frontend assets. This is useful for non-Blade contexts like JavaScript or CSS.
- Will Blade-Zondicons work with Livewire or Inertia.js?
- The package is Blade-focused, so it works seamlessly in Livewire or Inertia.js *when rendered server-side*. For client-side dynamic icon switching (e.g., Alpine.js), you’ll need to manually handle SVG assets or use a frontend-compatible library.
- Are there alternatives if I want to switch icon libraries later?
- Currently, Blade-Zondicons is tightly coupled to Zondicons. If you need flexibility, consider alternatives like `blade-ui-kit/blade-heroicons` or `blade-ui-kit/blade-lucide`, which support multiple icon sets.
- How do I handle icon failures or missing SVGs in production?
- Laravel 12’s improved Blade error handling will surface issues like missing icons. For silent fallbacks, wrap components in `@error` directives or use Blade’s `@if` checks to handle missing assets gracefully.
- Does Blade-Zondicons support dynamic theming or animations?
- Basic dynamic styling (e.g., classes, inline styles) is supported, but advanced theming or animations require manual CSS/JS. The package doesn’t natively integrate with Laravel Mix/Vite for dynamic effects.
- What’s the best way to load Zondicons in Laravel 12 with Vite 5+?
- For Vite integration, publish the raw SVGs and import them directly in your Vite config. Avoid inline Blade components if you need client-side optimizations, as they’re compiled server-side.