- How do I install secondnetwork/blade-tabler-icons in a Laravel app?
- Install it with Composer by running composer require secondnetwork/blade-tabler-icons. The package requires PHP 8.0 or higher and Laravel 9.0 or higher. After installation, you can use the provided Blade components directly in your views.
- What PHP and Laravel versions does blade-tabler-icons support?
- The README lists PHP 8.0 or higher and Laravel 9.0 or higher as requirements. It is built on Blade Icons, so standard Blade Icons compatibility applies. Check the package metadata before upgrading major Laravel versions.
- How do I render a Tabler icon in a Blade template?
- Use the self-closing Blade component syntax, such as <x-tabler-alert-circle />. You can also use the @svg directive with a name like tabler-alert-circle and pass classes. The component compiles to an SVG icon in your rendered Blade view.
- How do I add Tailwind classes or inline styles to a Tabler icon?
- Pass a class attribute directly to the component, for example <x-tabler-alert-circle class="w-6 h-6 text-gray-500" />. Inline styles are also supported with a style attribute, such as style="stroke-width: 1.25". For project-wide defaults, publish and edit the package config file.
- How do I use filled Tabler icons with blade-tabler-icons?
- Reference filled variants by adding -filled or -f to the icon name, such as <x-tabler-alert-circle-filled /> or <x-tabler-alert-circle-f />. These resolve to the corresponding filled SVG in the Tabler icon set. Use the same class and style attributes as regular icons.
- How do I publish and configure the blade-tabler-icons config file?
- Publish the config file with php artisan vendor:publish --tag=blade-tabler-icons-config, then edit blade-tabler-icons.php. The config exposes Blade Icons options such as default classes and default attributes. This lets you standardize icon styling across the application.
- Does blade-tabler-icons support Blade Icons caching?
- Yes. The package uses Blade Icons under the hood, and the README recommends enabling icon caching. Test cache clearing and deployment behavior so icon changes are picked up correctly. Caching can improve performance for repeated icon rendering.
- How do I publish raw Tabler SVG icons as assets?
- The README documents publishing the raw SVG icons as assets using vendor:publish. Use that option if you need the SVGs outside Blade components. After publishing, reference the files from your public assets as needed.
- Can I use blade-tabler-icons with React or Vue?
- No, this package is Blade-only and is intended for Laravel server-rendered views. If your frontend uses React or Vue, you would need additional tooling such as Inertia.js or a separate icon solution for those components. It is best suited to Laravel monoliths and Blade-centric stacks.
- How often are Tabler icons updated in secondnetwork/blade-tabler-icons?
- The repository checks weekly for new Tabler Icons releases using GitHub Actions and opens a pull request. Actual availability of new icons depends on those pull requests being merged and released. For long-term projects, review the repository activity and have a fallback plan for adding SVGs manually.