@apify/ui-icons

中文文档
1.61.0发布于 2026/11/05Apache-2.0TypeScriptES Module近 30 天下载 8202

Icons as React components

原始使用文档
文档目录5 节
  1. Install
  2. Quick start
  3. What's inside
  4. Storybook
  5. Contributing

@apify/ui-icons

Browse icons at the hosted Storybook.

Apify's icon set as ~280 typed React components, generated from SVGs via SVGR. Each icon ships with a viewBox (so it scales), accepts a size prop, and uses currentColor for fill (so it inherits text color and respects theming).

Drop-in replacement for the older @apify-packages/icons package — same import shape, broader icon set.

Install

pnpm add @apify/ui-icons

Peer dependencies (install in your project if not already there):

  • react 17.x · 18.x · 19.x
  • react-dom 17.x · 18.x · 19.x

No styled-components requirement — icons are plain SVG React components.

Quick start

import { ChevronRightIcon, SettingsIcon } from '@apify/ui-icons';

export const SettingsLink = () => (
    <a href="/settings">
        <SettingsIcon size="16" title="Settings" />
        Settings
        <ChevronRightIcon size="12" />
    </a>
);

Every icon accepts:

  • size?: string — pixel size as a string ('12', '16', '24', …). Default '24'.
  • title?: string + titleId?: string — accessible name. Omit for purely decorative icons (consumer should add aria-hidden).
  • className?: string — passed through to the <svg> element.

To recolor an icon, set the color of its parent (e.g. a button or text node). The SVG fill is currentColor.

What's inside

  • ~280 icons covering navigation (ChevronRightIcon, ArrowSortIcon), state (CheckIcon, MinusIcon, AlertIcon), surfaces (SettingsIcon, BellIcon, BookmarkIcon), and Apify-specific concepts (ActorIcon, DatasetIcon).
  • Typed — each component is a FC<IconProps> with size, title, titleId, className props.
  • Themeable — fill="currentColor" everywhere, so color comes from the parent's CSS color.
  • Tree-shakeable — each icon is a named export, bundlers drop the unused ones.

Browse the full catalog in Storybook (see below).

Storybook

From the repository root:

pnpm run storybook

The icon catalog lives in the shared Storybook at http://localhost:6007 under "Iconography".

Contributing

See CONTRIBUTING.md for how to add a new icon (SVGR workflow), build instructions, and the accessibility notes.

版本与发布记录

@apify/ui-icons 共发布 141 个版本,首次发布于 2025/02/12;过去 12 个月发布了 101 个版本。

版本发布日期距今
1.61.0latest2026/11/05今天
1.60.02026/11/042 天前
1.59.02026/11/033 天前
1.58.02026/11/023 天前
1.57.1-feataddcodexbrandicon-ad7691.1242026/11/015 天前
1.57.1-feataddcodexbrandicon-ad7691.1062026/10/307 天前

其他发布通道:featurepublishuilibrary-0a4729 → 0.4.2-featurepublishuilibrary-0a4729.38420,featunifyUserStats-5c4819 → 0.9.1-featunifyUserStats-5c4819.338,featurereact19upgrade-8b5553 → 1.23.1-featurereact19upgrade-8b5553.279,beta → 1.24.0,chorerewritepublishworkflowo-80feae → 1.24.1-chorerewritepublishworkflowo-80feae.30,chorechangeswitchicon-51301b → 1.24.1-chorechangeswitchicon-51301b.65。

关于 @apify/ui-icons 的常见问题

@apify/ui-icons 是什么?

Icons as React components

如何安装 @apify/ui-icons?

在项目目录运行 npm install @apify/ui-icons,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(17.x || 18.x || 19.x)、react-dom(17.x || 18.x || 19.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@apify/ui-icons 支持 TypeScript 吗?

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

@apify/ui-icons 支持 ESM 还是 CommonJS?

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

@apify/ui-icons 可以商用吗?

@apify/ui-icons 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@apify/ui-icons 的下载量有多少?

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

@apify/ui-icons 还在维护吗?

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