@2en/icons

中文文档
0.0.1发布于 2026/05/08UNLICENSEDTypeScriptES Module近 30 天下载 21.7万

Clawly's standard icon library — central-icons re-exported for both React Native and Web, plus selectively vendored @2en/openai-icons glyphs and Clawly-custom additions.

原始使用文档
文档目录6 节
  1. Quick usage
  2. Naming
  3. Cross-platform
  4. IconName type
  5. Conventions
  6. License

@2en/icons

Clawly's standard icon library — one import path, both React Native and Web.

Quick usage

import {IconBubbleQuestion, IconBubbleQuestionFilled} from '@2en/icons'

// Outlined (no suffix)
<IconBubbleQuestion size={24} color="#1d1d1f" />
// Filled
<IconBubbleQuestionFilled size={24} color="#1d1d1f" />

Each icon takes IconProps (re-exported from upstream CentralIconBaseProps): size?: number | string (default 24), color, style, plus the underlying SVG props.

Naming

Outlined and filled are separate components, not a variant prop — tree-shaking only ships what you import.

FormMeaning
IconArchiveoutlined
IconArchiveFilledfilled

A handful of glyphs are vendored from @2en/openai-icons instead of central-icons (e.g. IconArchive, IconStop, IconTasks); these don't expose a *Filled variant — mixing the oai outlined with a central filled would clash visually.

Cross-platform

import {IconArchive} from '@2en/icons' works in both React Native (Metro / Expo) and React Web (Webpack / Vite / Next.js). The package's exports field switches by bundler condition:

  • react-native → @central-icons-react-native/*
  • default → @central-icons-react/*

react-native and react-native-svg are optional peer deps — Web-only consumers see no install warnings.

IconName type

IconName is the intersection of native ∩ web — names guaranteed to exist on every platform. Names exclusive to one platform are still importable, just absent from this union.

Conventions

  • No deep imports. Always import {IconX} from '@2en/icons'.
  • PascalCase, Icon prefix.
  • No default exports. Always named.

License

Re-exported icons under src/central-icons/ are sourced from Iconists Central Icons under our purchased license; the Iconists license terms apply. Vendored glyphs in src/openai-icons/ retain @2en/openai-icons' license. Hand-authored content in src/custom/ is Clawly's.


Working on this package? See CLAUDE.md.

版本与发布记录

@2en/icons 共发布 1 个版本,首次发布于 2026/05/08;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.0.1latest2026/05/086 个月前

关于 @2en/icons 的常见问题

@2en/icons 是什么?

Clawly's standard icon library — central-icons re-exported for both React Native and Web, plus selectively vendored @2en/openai-icons glyphs and Clawly-custom additions.

如何安装 @2en/icons?

在项目目录运行 npm install @2en/icons,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@2en/icons 支持 TypeScript 吗?

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

@2en/icons 支持 ESM 还是 CommonJS?

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

@2en/icons 可以商用吗?

@2en/icons 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@2en/icons 的下载量有多少?

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

@2en/icons 还在维护吗?

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