ihahachi/calcite-ui-icons

Calcite UI Icons Blade component for Laravel

Maintainers

Package info

github.com/ihahachi/calcite-ui-icons

Language:Blade

pkg:composer/ihahachi/calcite-ui-icons

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.2 2026-04-02 23:05 UTC

This package is auto-updated.

Last update: 2026-04-02 23:05:28 UTC


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" />

With scale:

<x-calcite-icon icon="user" scale="l" />

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
scale string m Icon scale (s, m, l)

Example:

<x-calcite-icon icon="download" class="w-6 h-6" scale="l" />

โš™๏ธ 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',

    'scale' => 'm',

    'auto_load' => true,

];

Available Options

Option Description
class Default icon class
scale Default icon scale
auto_load Auto load Calcite UI script

๐Ÿงช Testing

Run tests using PHPUnit.

vendor/bin/phpunit

or

composer test

๐Ÿค Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a branch
git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push
git push origin feature/new-feature
  1. 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.