@featherk/icons

中文文档
0.19.4发布于 2026/11/14MITTypeScriptESM + CJS零依赖近 30 天下载 2802

Small package providing a set of SVG icons consumable by Kendo UI's SvgIcon component.

原始使用文档
文档目录8 节
  1. Usage
  2. Named imports (recommended)
  3. getCustomIcon (loads every icon)
  4. Types
  5. Icon gallery
  6. Font Awesome Build Integration
  7. Adding icons
  8. Changelog

@featherk/icons

Small package providing a set of SVG icons consumable by Kendo UI's SvgIcon component.

Built and tested against Kendo UI for Vue 6.4.1 (@progress/kendo-vue-common is an optional peer dependency).

Usage

There are two ways to get an icon. Both return the same icon object for Kendo's SvgIcon; they differ in how much of the icon set your app bundles.

WaySinceWhat your app bundles
Named import: import { searchIcon }0.18.0Only the icons you import (under 1 KB each)
getCustomIcon("search") (CustomIcon)beforeEvery icon in the package (about 120 KB gzip)

getCustomIcon is unchanged and fully backward compatible, so existing code keeps working without changes. Because it looks icons up by name, a bundler can't tell which ones you use, so it loads all of them. Switch to named imports to load only the icons you specify.

Every icon has a named export: the icon name in camelCase plus Icon, so date_range is dateRangeIcon. The icon gallery lists each export name.

<template>
  <SvgIcon :icon="searchIcon" />
</template>
<script setup lang="ts">
  import { SvgIcon } from "@progress/kendo-vue-common";
  import { searchIcon } from "@featherk/icons";
</script>

getCustomIcon (loads every icon)

Use getCustomIcon when the icon name is only known at runtime, or to change the color or viewBox. It takes a CustomIcon name and returns a new icon object on each call:

import { getCustomIcon } from "@featherk/icons";

const icon = getCustomIcon("search");

Calling getCustomIcon anywhere in your app bundles the full icon set, even if named imports are used elsewhere. The same applies to importing the icons registry.

Types

  • CustomIcon: union of supported icon identifier strings (see packages/icons/src/custom-icon.ts).
  • GetCustomIconOptions: { viewBox?: string; color?: string } — viewBox overrides the SVG viewBox; color replaces currentColor fills/strokes.

Example — type an icon name:

import type { CustomIcon } from "@featherk/icons";

const iconName: CustomIcon = "search";
// const badIcon: CustomIcon = "not-a-real-icon"; // Type error

Example — use the typed name with the helper:

import { getCustomIcon, type CustomIcon } from "@featherk/icons";

const iconName: CustomIcon = "help";
const icon = getCustomIcon(iconName);

Example — change viewBox and color:

<template>
  <SvgIcon :icon="helpIcon" />
  <SvgIcon :icon="successIcon" />
</template>
<script setup lang="ts">
  import { SvgIcon } from "@progress/kendo-vue-common";
  import { getCustomIcon } from "@featherk/icons";

  const helpIcon = getCustomIcon("help", {
    viewBox: "0 0 28 28",
    color: "var(--kendo-color-primary)",
  });

  const successIcon = getCustomIcon("check", {
    color: "var(--kendo-color-success)",
  });
</script>

For experimental and in-development helper functions (CSS helpers, base64 variants, data URL usage, and related utilities) see COMING-SOON.md.

View the icon gallery

Font Awesome Build Integration

Font Awesome services are separate from getCustomIcon() and the owned icon registry. They generate selected icons from the consumer's installed Font Awesome packages; the package includes no Free or paid Font Awesome artwork and grants no license rights.

One keys-only manifest drives the whole setup:

# 1. List UX-provided catalog keys in fontawesome.keys.json: { "free": [...], "pro": [...] }
# 2. Install exactly those source packages: Free into the app, Pro into fontawesome-pro-sources/.
#    (Add --free-only when there are no Pro keys.)
npx featherk-fontawesome-setup --manifest fontawesome.keys.json
// 3. Generate them in vite.config.ts; builds include Pro icons wherever fontawesome-pro-sources/ is installed.
featherkFontAwesome({ manifest: "fontawesome.keys.json" });

Follow FeatherK FontAwesome Developer Setup for the step-by-step local and CI setup. See Choose Font Awesome Icons and Create a Manifest for keys, and Font Awesome setup for the Quick Start and advanced setups. The metadata-only Free/Pro catalog is published at @featherk/icons/fontawesome/catalog.

For paid source packages, see Pro licensing and setup. Pro access is consumer-owned and optional; no paid artwork is distributed by this package.

Adding icons

Icons in this package are curated from the validated source assets in NantHealth/iconography. See the icon contribution guide for the source-to-package copy and generation workflow.

Changelog

Release history for all @featherk/* packages is maintained in a single CHANGELOG.md.

版本与发布记录

@featherk/icons 共发布 121 个版本,首次发布于 2025/10/08;过去 12 个月发布了 108 个版本。

版本发布日期距今
0.19.4latest2026/11/14今天
0.19.32026/11/113 天前
0.19.22026/11/058 天前
0.19.12026/10/3114 天前
0.19.02026/10/2717 天前
0.18.12026/10/2421 天前

关于 @featherk/icons 的常见问题

@featherk/icons 是什么?

Small package providing a set of SVG icons consumable by Kendo UI's SvgIcon component.

如何安装 @featherk/icons?

在项目目录运行 npm install @featherk/icons,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 featherk-fontawesome、featherk-fontawesome-setup,可以用 npx featherk-fontawesome 直接运行。

@featherk/icons 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@featherk/icons 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@featherk/icons 可以商用吗?

@featherk/icons 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@featherk/icons 的下载量有多少?

根据 npm 官方下载统计,@featherk/icons 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,802 次,日均约 93 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@featherk/icons 还在维护吗?

最新版本 0.19.4 发布于 2026/11/14(今天);至今共发布 121 个版本,其中过去 12 个月发布了 108 个;首次发布于 2025/10/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。