定制 abduns/hugeicons-flux 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abduns/hugeicons-flux

Composer 安装命令:

composer require abduns/hugeicons-flux

包简介

Use any Hugeicons icon as a native <flux:icon.hugeicons.*> component in Flux UI — the free Stroke Rounded set bundled, or generate all 9 Pro styles from your own Hugeicons licence.

README 文档

README

Use any Hugeicons icon as a native flux:icon.hugeicons.* component in Flux UI — the free Stroke Rounded set bundled, or generate all 9 Pro styles from your own Hugeicons licence.

Tests Version Downloads License

Features

  • Modern PHP support
  • Lightweight and fast
  • Integrates Hugeicons seamlessly with Flux UI
  • Bundled with 5,100+ free Stroke Rounded icons
  • Automatically generate Pro styles from your own license
  • Agent Skill included for Laravel Boost, Codex, and Claude Code workflows

Installation

composer require abduns/hugeicons-flux

Quick Start

// Use it directly in your Blade views

Example output:

<flux:icon.hugeicons.home-01 class="size-8" />

Laravel Boost

This package ships a Laravel Boost Agent Skill at:

resources/boost/skills/hugeicons-flux/SKILL.md

Laravel Boost can discover it during boost:install or boost:update --discover. If you want to publish the skill into your application's .ai/skills directory for customization, run:

php artisan hugeicons:boost-skill

Use --force to replace an existing local copy.

Why This Package?

  • Missing modern PHP features
  • Poor developer experience
  • Too framework-coupled

This package focuses on simplicity, interoperability, and modern developer ergonomics to integrate Hugeicons into Laravel Flux UI effortlessly.

Usage

Basic Usage

Every icon is flux:icon.hugeicons.{name}, where {name} is the kebab-case Hugeicons name (Home01Iconhome-01, AiSearch02Iconai-search-02).

{{-- Default --}}
<flux:icon.hugeicons.home-01 />

{{-- Sizing & colour — like any Flux icon --}}
<flux:icon.hugeicons.home-01 class="size-10 text-blue-500" />

{{-- As an `icon` prop on other Flux components --}}
<flux:button icon="hugeicons.calendar-03" />
<flux:navlist.item icon="hugeicons.dashboard-square-01">Dashboard</flux:navlist.item>

Advanced Usage

The variant prop accepts the real Hugeicons style names, plus Flux's own outline / solid / mini / micro as aliases:

<flux:icon.hugeicons.search-01 variant="solid-rounded" class="size-8 text-amber-500" />
variant Resolves to
outline (default), mini, micro, stroke, stroke-rounded stroke-rounded
solid, solid-rounded solid-rounded
bulk-rounded, duotone-rounded, twotone-rounded, *-sharp, … the matching Hugeicons style

If an icon has not been built with a requested style (e.g. you only have the free set), the variant gracefully falls back to stroke-rounded.

Configuration (Pro Icons)

To use Pro icon styles you need to:

  1. Tell npm where to download Hugeicons Pro packages from (.npmrc)
  2. Provide your licence key as an environment variable
  3. Install the Pro packages and generate the icons

Step 1 — Create or edit .npmrc

.npmrc is a plain-text config file that npm reads before installing packages. Create (or open) a file called .npmrc in the root of your project (same folder as package.json) and add these two lines:

@hugeicons-pro:registry=https://npm.hugeicons.com/
//npm.hugeicons.com/:_authToken=${HUGEICONS_PRO_LICENSE_KEY}

What this does

  • Line 1 tells npm to fetch every @hugeicons-pro/* package from the Hugeicons registry instead of the public npm registry.
  • Line 2 authenticates you with your licence key. The ${HUGEICONS_PRO_LICENSE_KEY} placeholder is replaced automatically by npm using the environment variable of the same name — you never hard-code your key in this file.

Tip — commit .npmrc, never your key It is safe (and recommended) to commit .npmrc to version control because it contains no secrets — only the ${…} placeholder. Your actual key lives only in the environment.

Step 2 — Set the HUGEICONS_PRO_LICENSE_KEY environment variable

Your licence key is available in your Hugeicons dashboard.

Choose the method that fits your workflow:

macOS / Linux — current terminal session

export HUGEICONS_PRO_LICENSE_KEY="your-licence-key-here"

Run this once per terminal session before you run npm install. The key is gone when you close the tab.

macOS / Linux — permanent (shell profile)

Add the export line to your shell config so it is always available:

# ~/.zshrc  (zsh, default on modern macOS)
# ~/.bashrc  (bash)
echo 'export HUGEICONS_PRO_LICENSE_KEY="your-licence-key-here"' >> ~/.zshrc
source ~/.zshrc

Windows — PowerShell (current session)

$env:HUGEICONS_PRO_LICENSE_KEY = "your-licence-key-here"

Windows — permanent (System Environment Variables)

  1. Open Start → search "Environment Variables" → Edit the system environment variables
  2. Click Environment Variables…
  3. Under User variables, click New
  4. Variable name: HUGEICONS_PRO_LICENSE_KEY
  5. Variable value: your-licence-key-here
  6. Click OK and restart your terminal

CI / CD (GitHub Actions, etc.)

Store the key as a repository secret (e.g. HUGEICONS_PRO_LICENSE_KEY) and expose it as an environment variable in your workflow:

- name: Install dependencies
  run: npm ci
  env:
    HUGEICONS_PRO_LICENSE_KEY: ${{ secrets.HUGEICONS_PRO_LICENSE_KEY }}

.env file (Laravel)

If you prefer keeping all project secrets in one place, add it to your Laravel .env file:

HUGEICONS_PRO_LICENSE_KEY=your-licence-key-here

Then export it for npm by running:

export HUGEICONS_PRO_LICENSE_KEY="$(grep HUGEICONS_PRO_LICENSE_KEY .env | cut -d '=' -f2)"

Never commit .env — it is already in .gitignore by default in Laravel projects.

Step 3 — Install the Pro packages and build

With .npmrc in place and the environment variable set, run:

npm install --save-optional \
  @hugeicons-pro/core-stroke-rounded \
  @hugeicons-pro/core-solid-rounded

php artisan hugeicons:build

Available Pro packages (install only the styles you need):

Package Style
@hugeicons-pro/core-stroke-rounded Stroke Rounded
@hugeicons-pro/core-solid-rounded Solid Rounded
@hugeicons-pro/core-bulk-rounded Bulk Rounded
@hugeicons-pro/core-duotone-rounded Duotone Rounded
@hugeicons-pro/core-twotone-rounded Twotone Rounded

After hugeicons:build completes, the generated Blade components are ready to use via the variant prop.

Standards / Specifications

References:

Supported Features

Feature Support
Free Stroke Rounded Set
Pro Styles Generator
Laravel Boost Agent Skill
Claude Code Skill

Compatibility

Platform Supported
PHP 8.2+
Laravel 11.0+
Flux UI 2

Design Goals

  • Developer experience first
  • Predictable APIs
  • Minimal dependencies
  • Strong typing
  • Extensibility
  • Interoperability

Architecture

  • Blade anonymous-component integration
  • Zero footprint for unused Pro icons
  • Deferred service provider registration for overriding

Performance

Operation Time
Render component < 1ms

Testing

composer test

Contributing

Contributions, issues, and discussions are welcome.

Security

If you discover security issues, please report them responsibly.

License

MIT

abduns/hugeicons-flux 适用场景与选型建议

abduns/hugeicons-flux 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 494 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「flux」 「laravel」 「icons」 「blade」 「livewire」 「Hugeicons」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 abduns/hugeicons-flux 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 abduns/hugeicons-flux 我们能提供哪些服务?
定制开发 / 二次开发

基于 abduns/hugeicons-flux 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 494
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 276
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-15