ihahachi/calcite-ui-icons
最新稳定版本:v1.0.5
Composer 安装命令:
composer require ihahachi/calcite-ui-icons
包简介
Calcite UI Icons Blade component for Laravel
README 文档
README
Blade component package to easily use Calcite UI Icons in Laravel applications.
This package provides a clean and simple way to render Calcite UI Icons using Blade components with configurable defaults, publishable configuration, and test support.
📦 Installation
Install the package via Composer:
composer require ihahachi/calcite-ui-icons
Laravel automatically discovers the service provider.
🚀 Usage
Use the icon component directly in your Blade views.
<x-calcite-icon icon="layer" />
With custom class:
<x-calcite-icon icon="search" class="w-6 h-6 text-gray-500" />
Full example:
<div class="flex items-center gap-2"> <x-calcite-icon icon="user" class="w-5 h-5 text-blue-500" /> <span>User Section</span> </div>
🎯 Icon Names
All available icons come from the Calcite UI Icons library.
Browse icons here:
https://esri.github.io/calcite-ui-icons/
Copy the icon name and use it in the component.
Example:
user
search
download
upload
layer
plus
minus
trash
Usage:
<x-calcite-icon icon="download" />
🧩 Component Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | string | required | Icon name from Calcite UI Icons |
| class | string | config value | CSS classes |
Example:
<x-calcite-icon icon="download" class="w-6 h-6" />
⚙️ Configuration
Publish the config file:
php artisan vendor:publish --tag=calcite-icons-config
This will create:
config/calcite-icons.php
🛠 Config File
return [ 'class' => 'w-5 h-5', 'auto_load' => true, ];
Available Options
| Option | Description |
|---|---|
| class | Default icon class |
| auto_load | Auto load Calcite UI script |
🧪 Testing
Run tests using Pest.
vendor/bin/pest
or
composer test
🤝 Contributing
Contributions are welcome.
- Fork the repository
- Create a branch
git checkout -b feature/new-feature
- Commit changes
git commit -m "Add new feature"
- Push
git push origin feature/new-feature
- Create Pull Request
📄 License
MIT License
❤️ Credits
- Calcite UI Icons
🔗 Resources
Calcite UI Icons
https://esri.github.io/calcite-ui-icons/
⭐ Support
If you find this package useful, please consider giving it a star on GitHub.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-02