ozzyczech/latte-lucide-icons
最新稳定版本:v0.0.6
Composer 安装命令:
composer require ozzyczech/latte-lucide-icons
包简介
A package to easily make use of Lucide icons in your Latte templates.
README 文档
README
Latte Lucide Icons
This package provides a Latte macro {lucide} for
rendering Lucide icons in your Latte / Nette application.
🚀 Installation
composer require ozzyczech/latte-lucide-icons
Requirements:
- PHP 8.1+
- Nette 3.2+
⚙️ Setup
Option 1: Register via services.neon
extensions: lucideIcons: OzzyCzech\LucideIcons\NetteExtension
Option 2: Register via common.neon (with custom Latte setup)
latte: strictTypes: yes strictParsing: yes extensions: - App\Presentation\Accessory\LatteExtension - OzzyCzech\LucideIcons\LatteExtension
Option 3: Register the macro manually
You can also register macro manually:
class MySuperExtensions extends Latte\Extension { public function getTags(): array { return [ 'lucide' => OzzyCzech\LucideIcons\LucideNode::create(...), ]; } }
🧪 Usage
Use the macro directly in your .latte templates:
<button type="button"> {lucide "check" class => "text-green-500"} Lucide Check Icon </button>
This renders the following HTML:
<button type="button"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check text-green-500"> <path d="M20 6 9 17l-5-5"/> </svg> </button>
👨🔧 Maintainer
Maintained by Roman Ožana. Contributions are welcome via issues or pull requests.
📄 License
Latte Lucide Icons is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 250
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-18