@gener8v/icons

中文文档
0.64.0发布于 2026/11/10MITTypeScriptES Module零依赖近 30 天下载 4872

The Phosphor subset the GENER8V design system actually uses, as tree-shakeable React components.

原始使用文档
文档目录15 节
  1. Install
  2. Use
  3. The icons
  4. Actions
  5. Navigation
  6. Status
  7. Records
  8. Communication
  9. People and agents
  10. Access
  11. Grounds
  12. Governance
  13. Adding an icon
  14. Why a subset
  15. Relationship to the other packages

@gener8v/icons

The icons the GENER8V design system uses, taken from Phosphor at regular weight and shipped as tree-shakeable React components.

Install

npm i @gener8v/icons

The package is public on npm under the MIT licence. It needs React 18 or later and nothing else.

Use

import { ArrowRight, Warning } from '@gener8v/icons';

<button className="btn btn-primary">Continue<ArrowRight /></button>

Every icon takes the normal SVG props and follows three rules:

  • Size comes from the text. Icons are 1em square, so they match the type around them. Inside .btn the CSS sets 1.15em, so one icon works at every button size. To set a size directly, pass width and height.
  • Colour comes from the text. The fill is currentColor. An icon never gets its own colour token, so the same glyph works on a light card and inside a filled button.
  • Hidden from screen readers by default. An icon beside a label is decoration and is aria-hidden. Pass aria-label when the icon has to stand on its own. For an icon-only button, use <Button iconOnly aria-label="…"> from @gener8v/ui, which makes the label required.

The icons

Each icon has one meaning in GENER8V products. Use it for that meaning, so it reads the same on every screen. The demo page at design/foundations/icons.html shows the same set; hover an icon there to see what it is for.

68 icons in 9 groups.

Actions

Things a person does to what is on the screen.

IconPhosphor sourceUse it for
ArrowsDownUparrows-down-upChanging the order of a list. A column's current direction is CaretUp or CaretDown.
ArrowSquareOutarrow-square-outLeaves the product: opens somewhere else, usually in a new tab. Never a link that stays inside the record.
CopycopyCopying a value to the clipboard — an ID, a link, a snippet — without leaving the surface.
DotsThreedots-threeMore, where the more is a menu rather than a page.
DownloadSimpledownload-simpleTaking something out of the record, as a file somebody keeps.
FunnelfunnelNarrowing what a list shows. The records stay; only the view changes.
Linklink-simpleOne thing joined to another — built against, derived from.
MagnifyingGlassmagnifying-glassFinding something already here, as against asking a question of it.
MinusminusTaking one away, or stepping a value down. The counterpart to Plus.
PencilSimplepencil-simpleEditing something that already exists. Note is a note somebody wrote; this is the act of changing one.
PlusplusAdding one more of something the surface already lists.
TrashtrashDeleting something for good. A product that keeps history archives or supersedes instead, and does not offer this.
UploadSimpleupload-simplePutting material on the record.
XxClose or dismiss. Never delete — that is Trash.

Navigation

Moving between surfaces, and opening what is folded away.

IconPhosphor sourceUse it for
ArrowLeftarrow-leftBack out of a surface to the one that opened it — the navigation CaretLeft is never used for.
ArrowRightarrow-rightForward, on a control that continues something rather than confirming it.
CaretDowncaret-downA group that opens. The same chevron everywhere one does, so the state reads the same.
CaretLeftcaret-leftBack, within a set — a page, a step. Never navigation out of a surface.
CaretRightcaret-rightA group that is closed, and a rail item that leads somewhere.
CaretUpcaret-upA group that is open and closes on click, and the ascending end of a sort.
HousehouseThe start of a product: the one place every surface can return to.
ListlistNavigation folded away on a narrow screen. Not a list of records — that is content, not a control.
Settingssliders-horizontalSettings: how the product is configured, as against the content it holds.

Status

The state of something, readable at a glance.

IconPhosphor sourceUse it for
BellbellSomething new the person has not seen yet. Notifications, not a message on the page.
CheckcheckDone, or chosen. Never 'good' — a covered requirement is not a compliment.
CheckCirclecheck-circleFinished successfully, as a status. Check marks done or chosen; the circle makes it an outcome.
CircleNotchcircle-notchRunning, as a status label. A control that is loading uses the spinner, which animates; this glyph does not.
Flagflag-pennantFlagged rather than resolved — a contradiction, a held-open decision touched.
InfoinfoSomething worth knowing that changes nothing. Never a warning wearing a quieter colour.
QuestionquestionHelp, or something not yet answered. Never an Info in disguise.
WarningwarningSomething is wrong and somebody has to act. Never used for absence.
XCirclex-circleFailed, as a status. X closes or dismisses; the circle makes it an outcome.

Records

The things a record holds.

IconPhosphor sourceUse it for
BooksbooksA module: a governance library this project is measured against.
CalendarBlankcalendar-blankA date — due, scheduled, held — as against a length of time.
ChartBarchart-barNumbers drawn as a chart: a report, a metric. Graph is how things join; this is how much.
ClockclockHow long something takes, or when in the day. History is the past of the record; this is time itself.
Coveragelist-checksWhat a standard requires, and how much of it is covered.
FilefileA document on the record — uploaded, rendered, or cited.
FolderfolderA place documents are kept, as against one document.
GraphgraphThe record as a shape: what is joined to what.
Historyclock-counter-clockwiseHow this project got that way, as against what is true now.
ImageimageEvidence that is a picture — a screenshot, a diagram somebody sent.
Notenote-pencilSomething a person wrote down, beside what was uploaded.
PaperclippaperclipSomething attached to an item, as against a document on the record in its own right.
PathpathA route through — a flow, a sequence of steps.
TagtagA label a person applied to sort things. Not a status the system decided.

Communication

What people said, and the channel it came through.

IconPhosphor sourceUse it for
ChatCirclechat-circleA comment thread on the work. Transcript is what was said in a session; this is what people said about the work afterwards.
EnvelopeSimpleenvelope-simpleEmail: a message that arrives in, or goes out to, an inbox outside the product.
Microphonemicrophone-stageA voice: an interview, a session, somebody speaking.
Transcriptchat-teardrop-textWhat was said, written down — a coded session.

People and agents

Who did the work. An agent is never drawn as a person.

IconPhosphor sourceUse it for
BuildingsbuildingsAn organisation — a client, a vendor, a party to the work — as against the people in it.
RobotrobotAn agent. Distinct from a person, deliberately and everywhere.
SparklesparkleDrafted by a model and waiting for a person. It labels the output; Robot is the agent that made it.
UserCircleuser-circleOne person, where a name alone would not read as a person.
UsersusersA group of people — a team, a directory. One person is UserCircle.

Access

Signing in, and what is private.

IconPhosphor sourceUse it for
KeykeyA credential a script uses, where no person is signed in.
LocklockPrivate to the project it belongs to.
SignInsign-inSigning in, on the sign-in screen and its button.
SignOutsign-outSigning out on purpose. Not for a session that expired.

Grounds

The three grounds an observation can rest on: said, observed, inferred.

IconPhosphor sourceUse it for
EyeeyeObserved: seen happening, or a document shows it. One of the three grounds.
Inferredlightbulb-filamentInferred: concluded from what was said. This label must stay attached wherever the observation goes.
QuotesquotesSaid: somebody stated it. One of the three grounds.

Governance

Whether a rule is in force, and what has moved underneath it.

IconPhosphor sourceUse it for
ArrowsClockwisearrows-clockwiseStale: work waiting on a rebuild because something it depends on changed. Other icon sets call this RefreshCw.
GitDiffgit-diffA standard changed underneath a decision made against it. Other icon sets call this GitCompareArrows.
Governedshield-checkIn force. A module routed to, a rule being applied.
ScalesscalesA judgement made by weighing the evidence — an assessment, a ruling.
Shelvedbookmark-simplePrepared, not in force — on the shelf.
StampstampAn approval: a named person signed off.

Adding an icon

  1. Look in the tables above first. If an icon already covers the meaning, use it.
  2. Find the glyph in Phosphor at regular weight. Use no other weight: two weights in one interface look like two icon sets.
  3. Copy an existing file in src/ to src/<Name>.tsx and paste in the glyph's path.
  4. In the doc comment, give the Phosphor name, one sentence on what the icon means here, and an @group from the tables above.
  5. Export it from src/index.ts.
  6. Run pnpm build from the repository root. This updates the tables in this file and the demo page.
  7. Run pnpm test. The tests fail if an icon is not exported, has no stated meaning or group, or is missing from this file or the demo page.

Names. Use Phosphor's name (MagnifyingGlass, ArrowsClockwise) unless the icon stands for a product concept. Then name it for the concept: Governed is Phosphor's shield-check, and Inferred is lightbulb-filament.

Why a subset

Phosphor has about 1,500 icons. A design system that ships all of them makes every product carry 1,500 glyphs to draw a few dozen. This set holds the icons GENER8V products need, and it grows when a product needs a new one.

Relationship to the other packages

This package does not depend on @gener8v/ui or @gener8v/tokens. The design system's static HTML pages have no bundler, so they inline the same SVG paths instead of importing this package.

版本与发布记录

@gener8v/icons 共发布 80 个版本,首次发布于 2026/08/24;过去 12 个月发布了 80 个版本。

版本发布日期距今
0.64.0latest2026/11/106 天前
0.63.02026/11/0511 天前
0.62.02026/11/0511 天前
0.61.02026/11/0411 天前
0.60.02026/11/0412 天前
0.59.12026/11/0312 天前

关于 @gener8v/icons 的常见问题

@gener8v/icons 是什么?

The Phosphor subset the GENER8V design system actually uses, as tree-shakeable React components.

如何安装 @gener8v/icons?

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

@gener8v/icons 支持 TypeScript 吗?

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

@gener8v/icons 支持 ESM 还是 CommonJS?

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

@gener8v/icons 可以商用吗?

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

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

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

@gener8v/icons 还在维护吗?

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