@bysages/icons

中文文档
0.6.0发布于 2026/11/07MITTypeScriptES Module近 30 天下载 1807

Icon registry for By Sages Elements — the Lucide collection as named exports, one canonical set for every framework wrapper

原始使用文档
文档目录5 节
  1. Features
  2. Installation
  3. Usage
  4. Why lucide, and why named exports
  5. License

@bysages/icons

npm version npm downloads npm license

The icon registry for By Sages Elements — the Lucide collection as named exports, one canonical set for every framework wrapper.

Features

  • 🗂 The collection whole, as named exports — every Lucide glyph is one IconifyIcon constant (import { calendar } from "@bysages/icons"); a consumer that knows which glyph it wants imports that one name
  • 📦 Shakeable by construction — the set compiles to per-glyph ES exports at generation time, so bundlers ship only the imports actually made, never the 590 KB raw JSON
  • 🧩 One set, every framework — react, vue, solid, and svelte all draw from this one registry, so a glyph never drifts between frameworks

Installation

# pnpm
pnpm add @bysages/icons

# npm
npm install @bysages/icons

# yarn
yarn add @bysages/icons

# bun
bun add @bysages/icons

Usage

Import the glyph by name and render it through any wrapper's Icon:

<script setup lang="ts">
import { Icon } from "@bysages/vue";
import { calendar } from "@bysages/icons";
</script>

<template>
  <Icon :glyph="calendar" label="Pick a date" />
</template>

Regenerate after the collection package updates:

pnpm --filter @bysages/icons generate

Why lucide, and why named exports

The collection is Lucide: feather-lineage strokes on a 24px grid — 2px, rounded caps and joins — the most actively maintained open set today, at home on warm paper, and the set code-generating agents name by default.

Serving the raw icons.json would hand every consumer the whole 590 KB (JSON does not tree-shake), and per-icon subpaths do not exist. So the collection compiles to named exports once, at generation time — data.generated.ts is committed, and generate runs only when the collection changes, never during build. The wrappers' own registry (the few glyphs the components draw) is curated in @bysages/core; everything else is a direct import away.

License

版本与发布记录

@bysages/icons 共发布 11 个版本,首次发布于 2026/09/27;过去 12 个月发布了 11 个版本。

版本发布日期距今
0.6.0latest2026/11/072 天前
0.5.02026/11/036 天前
0.4.42026/10/1922 天前
0.4.32026/10/1525 天前
0.4.22026/10/1328 天前
0.4.12026/10/1130 天前

关于 @bysages/icons 的常见问题

@bysages/icons 是什么?

Icon registry for By Sages Elements — the Lucide collection as named exports, one canonical set for every framework wrapper

如何安装 @bysages/icons?

在项目目录运行 npm install @bysages/icons,或使用 pnpm add / yarn add / bun add。

@bysages/icons 支持 TypeScript 吗?

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

@bysages/icons 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bysages/icons 可以商用吗?

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

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

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

@bysages/icons 还在维护吗?

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