- How do I install hasnayeen/blade-eva-icons in a Laravel app?
- Install it with Composer by running composer require hasnayeen/blade-eva-icons. Laravel package auto-discovery should register the service provider without manual edits. After installation, follow the README for any optional config publishing or cache-clearing steps.
- What is the Blade syntax for rendering an Eva icon?
- Use the Blade component provided by the package, commonly an x-eva-icon tag with a name attribute such as heart-outline. The exact component name and available icon names are listed in the README. Because the output is SVG, you can usually size and color it with normal CSS classes or inline styles.
- Can I change the size and color of Eva icons in Blade?
- Yes. The rendered SVG can be styled with CSS classes, width, height, style, or color attributes depending on what the component forwards. Using currentColor or a CSS color rule is often the simplest way to theme icons. Check the package docs for which attributes are passed through.
- Does hasnayeen/blade-eva-icons inline the SVG markup?
- The package is designed to render Eva Icons SVGs in Blade views, typically as inline SVG components. Inline SVG avoids separate image requests and works with CSS sizing and coloring. Confirm the exact rendering behavior in the README or by inspecting the generated HTML.
- Which Laravel and PHP versions does this package support?
- The supported Laravel and PHP versions come from the package composer.json constraints, not from this overview. Check the README and Packagist release metadata before installing. If you are on a newer Laravel version, test installation in a branch to confirm compatibility.
- Do I need to publish configuration files after installing?
- Basic usage usually requires only the Composer install and Blade component calls. If the package ships a config file, the README will show the vendor:publish command. Publishing is typically optional unless you need to customize defaults or assets.
- Can I use these Eva icons with Livewire components?
- Yes, Blade components can be rendered inside Livewire views because Livewire uses Blade for its markup. Place the icon component in your Livewire Blade template as you would in any other Laravel view. For dynamic icon names, bind the name attribute from your Livewire component state.
- How can I test that an Eva icon renders in Laravel?
- Use a Laravel feature or view test that requests a page or renders the Blade component and asserts the response contains SVG markup. You can assert you see the icon-specific path or class if the package adds one. Clear compiled views if a template change does not appear during local testing.
- Is hasnayeen/blade-eva-icons suitable for production use?
- It is a lightweight Blade wrapper for static SVG icons, so it is generally suitable for production Laravel apps when the package is maintained and compatible with your framework version. Inline SVGs add markup to the HTML response, so avoid rendering very large icon grids unnecessarily. Cache compiled Blade views as you normally would.
- What are alternatives to this package for Laravel icons?
- Alternatives include blade-ui-kit/blade-icons with icon sets, directly embedding Eva Icons SVG assets, or using front-end icon libraries such as Heroicons or Font Awesome. If you only need a few icons, copying the SVG markup into a Blade partial may be simpler. Choose based on icon set, maintenance, and whether you need server-rendered Blade components.