@asphalt-react/icontuner

中文文档
2.19.0发布于 2026/10/29UNLICENSEDTypeScriptESM + CJS近 30 天下载 1918

Icontuner

原始使用文档
文档目录17 节
  1. Supported intents:
  2. Usage
  3. Props
  4. children
  5. size
  6. danger
  7. warning
  8. info
  9. success
  10. muted
  11. brand
  12. disabled
  13. primary
  14. secondary
  15. invalid
  16. inverse
  17. resize

Icontuner

npm npm version

Icontuner can tune the size and intent of any icon from @asphalt-react/iconpack. Use Icontuner to modify icons that are part of content, for example, to show an icon with "warning" intent when a feature is deprecated, or use a "brand" intent when the icon appears in a hero section.

Supported intents:

  • warning
  • danger
  • info
  • success
  • muted
  • brand
  • disabled
  • primary
  • secondary
  • invalid
  • inverse

Usage

import { Icontuner } from "@asphalt-react/icontuner
import { Trash } from "@asphalt-react/iconpack

<IconTuner>
   <Trash/>
</IconTuner>

Props

children

Icon from @asphalt-react/iconpack.

typerequireddefault
nodetrueN/A

size

Size of the icon. accepts xxs, xs, s, m, l, xl, xxl.

typerequireddefault
enumfalse"m"

danger

Applies danger intent color to icon.

typerequireddefault
boolfalsefalse

warning

Applies warning intent color to icon.

typerequireddefault
boolfalsefalse

info

Applies info intent color to icon.

typerequireddefault
boolfalsefalse

success

Applies success intent color to icon.

typerequireddefault
boolfalsefalse

muted

Applies muted intent color to icon.

typerequireddefault
boolfalsefalse

brand

Applies brand intent color to icon.

typerequireddefault
boolfalsefalse

disabled

Applies disabled intent color to icon.

typerequireddefault
boolfalsefalse

primary

Applies primary intent color to icon.

typerequireddefault
boolfalsefalse

secondary

Applies secondary intent color to icon.

typerequireddefault
boolfalsefalse

invalid

Applies invalid intent color to icon.

typerequireddefault
boolfalsefalse

inverse

Applies inverse intent color to icon.

typerequireddefault
boolfalsefalse

resize

Resizes icon.

typerequireddefault
boolfalsetrue

版本与发布记录

@asphalt-react/icontuner 共发布 37 个版本,首次发布于 2022/03/30;过去 12 个月发布了 11 个版本。

版本发布日期距今
2.19.0latest2026/10/2910 天前
2.18.02026/10/071 个月前
2.16.02026/07/283 个月前
2.15.12026/04/286 个月前
2.15.02026/04/136 个月前
2.14.02026/03/117 个月前

其他发布通道:next → 2.0.0-alpha.29。

关于 @asphalt-react/icontuner 的常见问题

@asphalt-react/icontuner 是什么?

Icontuner

如何安装 @asphalt-react/icontuner?

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

@asphalt-react/icontuner 支持 TypeScript 吗?

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

@asphalt-react/icontuner 支持 ESM 还是 CommonJS?

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

@asphalt-react/icontuner 可以商用吗?

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

@asphalt-react/icontuner 的下载量有多少?

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

@asphalt-react/icontuner 还在维护吗?

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