@bradleyhodges/sfsymbols

中文文档
8.1.3发布于 2026/09/08TypeScriptESM + CJS近 30 天下载 1.2万

Apple's SF Symbols icons for React applications on Apple platforms.

原始使用文档
文档目录8 节
  1. Apple's SF Symbols icons for building React/Typescript appl…
  2. Features of this Library
  3. Version
  4. Available Icons
  5. 🚀 Getting Started
  6. Install the Packages
  7. Usage
  8. Building
SF Symbols 8

SF Symbols 8

Apple's SF Symbols icons for building React/Typescript applications on Apple platforms.

NPM Downloads by package author npmjs package GitHub repo
Version: 8.1.3 Platforms: Next.js – React.js – React Nav License: MIT

SF Symbols is a library of over 7,000 symbols that are designed to integrate seamlessly with San Francisco, the system font for Apple platforms.

Features • Version • Available Icons • 🚀 Getting Started • Install • Usage • Building • Issues • Pull Requests

Features of this Library

  • 8,111 Symbols - Contains the entire SF Symbols 8 (beta) icon library, plus an additional 609 supplementary brand icons
  • Tree-Shakeable - Each icon can be imported as a standalone component (<1 KB each) or as a bundled import
  • Type-Safe - Full TypeScript support with IDE autocomplete
  • Lightweight - Only imported icons end up in your bundle
  • React 18/19 - Works with the latest version of React

Version

This package has been built using the latest icons from Version 8.0 (135) – SF Font Version 22.0d4e4.

Available Icons

This package contains 8,111 icons, which includes 609 supplementary brand icons. All 7,502 of the Regular weight icons from the San Francisco font are included. Other weights are not included in this package, but the icon weights can be made heavier by applying a stroke to the vector paths.

For simplicity, I've created a basic icon browser for this package, which you can access here: bradleyhodges-sfsymbols.vercel.app Screenshot of a comment on a GitHub issue showing an image, added in the Markdown, of an Octocat smiling and raising a tentacle.

🚀 Getting Started

This package features the actual icons and icon data for SF Symbols 8. To use these icons in React applications, you can make use of the sfsymbols-react companion package, which exposes a convenient, easy-to-use React component for SF Symbols 8 icons.

Install the Packages

You will need to install the following packages to use the icons in your project:

Usage

[!CAUTION] SF Symbols is licensed by Apple for use only on Apple platforms. Use of this package, or any of the other @bradleyhodges/sfsymbols-* packages, outside of Apple platforms is NOT permitted. More info: Xcode and Apple SDKs Agreement

pnpm add @bradleyhodges/sfsymbols@latest @bradleyhodges/sfsymbols-react@latest @bradleyhodges/sfsymbols-types@latest

You can then import the icons in your project like so:

import { SFIcon } from '@bradleyhodges/sfsymbols-react';
import { sfArrowUpCircleFill } from '@bradleyhodges/sfsymbols';

...

<SFIcon icon={sfArrowUpCircleFill} />

[!TIP] See the sfsymbols-react package for detailed information on the properties that the SFIcon component accepts and how you can customise the appearance of icons in React applications using the companion component.

For faster module resolution, you can also import individual icons directly. This is optional; existing root imports remain supported and tree-shake in ESM builds.

import { sfArrowUpCircleFill } from '@bradleyhodges/sfsymbols/sfArrowUpCircleFill';

CommonJS consumers can use the same per-icon path with require(). This keeps bundles focused on the selected icon. Root CommonJS imports load icon definitions when their exports are accessed, but bundlers may still include the whole catalogue.

Building

  • pnpm build-icons generates TypeScript definitions from the locally supplied SVG archive.
  • pnpm build-package compiles generated src into validated ESM, CommonJS, and declaration outputs.
  • pnpm build-package --from-dist rebuilds an existing distribution without the SVG archive. It verifies both formats agree, preserves SVG data and metadata, and restores curated search aliases. Repeated runs do not accumulate aliases.
  • pnpm build retains the interactive archive/version workflow and uses the same package emitter.
  • pnpm test runs build regression tests; pnpm typecheck checks generated source and shipped declarations, including archive-free checkouts.

Package emission stages and validates all outputs before replacing dist. A failed replacement restores the previous distribution; if restoration is blocked, the error identifies the retained backup directory. Original SVG generation still requires your own source archive.

The full pnpm build workflow keeps the unpacked SVGs in build/src and generated TypeScript in src through version updates, compilation, minification, and output validation. Cleanup runs only after those steps succeed, with the original SVG inputs removed last. Package-version files use temporary-file replacement with bounded retries for Windows locks; files already at the requested version are left untouched.

[!NOTE] This repository contains the scripts necessary to build the icons and their respective React components. However, due to Apple's licensing terms, I have not included the actual icon archive in this repository, and I will not provide it upon request. This is to respect Apple's licensing terms, prevent any unauthorised use of the icons, and to avoid any legal issues.

版本与发布记录

@bradleyhodges/sfsymbols 共发布 7 个版本,首次发布于 2025/09/23;过去 12 个月发布了 6 个版本。

版本发布日期距今
8.1.3latest2026/09/082 个月前
8.1.12026/09/072 个月前
8.1.1-rc.0rc2026/09/072 个月前
8.0.42026/09/062 个月前
8.0.32026/09/062 个月前
8.0.22026/09/062 个月前

关于 @bradleyhodges/sfsymbols 的常见问题

@bradleyhodges/sfsymbols 是什么?

Apple's SF Symbols icons for React applications on Apple platforms.

如何安装 @bradleyhodges/sfsymbols?

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

@bradleyhodges/sfsymbols 支持 TypeScript 吗?

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

@bradleyhodges/sfsymbols 支持 ESM 还是 CommonJS?

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

@bradleyhodges/sfsymbols 可以商用吗?

@bradleyhodges/sfsymbols 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@bradleyhodges/sfsymbols 的下载量有多少?

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

@bradleyhodges/sfsymbols 还在维护吗?

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