@dfinity/gix-components

中文文档
10.0.5发布于 2026/10/19Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 5850

A UI kit developed by the GIX team

原始使用文档
文档目录4 节
  1. Getting Started
  2. Installation
  3. Packaging
  4. Documentation & Showcase

GIX Components

[!WARNING] GIX Components is in maintenance mode. The library receives critical fixes only — no new features or components are being added. We recommend against adopting it for new projects.

GIX Components is a UI kit developed with SvelteKit by the GIX team.

Getting Started

The component library has been originally implemented for the frontend dapp of the Network Nervous System (NNS).

It undergoes continuous improvements, and its showcase and documentation are deployed on the IC: https://gix.design/.

Installation

Install gix-components as a dependency.

npm i @dfinity/gix-components

Packaging

Running npm run package bundles the library. It takes the contents of src/lib and generate a dist directory.

The root directory can be used to consume a local version of gix-components in another project (npm i /../gix-components).

However, to run 'jest' unit tests in the other project, the library needs to be packed first (cd package && npm pack) before being installed (e.g. npm i /../gix-components/dfinity-gix-components-0.0.1.tgz).

See documentation for more information.

Documentation & Showcase

To run the documentation locally, npm run dev can be executed.

Running npm run build will bundle the showcase. It should be executed before deploying the documentation to a canister smart contract.

Note: all pages of the application are set to be pre-rendered per default.

版本与发布记录

@dfinity/gix-components 共发布 1,009 个版本,首次发布于 2022/08/06;过去 12 个月发布了 9 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
10.0.5latest2026/10/1923 天前
10.0.42026/09/181 个月前
10.0.32026/06/224 个月前
10.0.22026/05/126 个月前
10.0.12026/05/116 个月前
10.0.02026/01/239 个月前

其他发布通道:next → 9.0.0-next-2026-01-22。

关于 @dfinity/gix-components 的常见问题

@dfinity/gix-components 是什么?

A UI kit developed by the GIX team

如何安装 @dfinity/gix-components?

在项目目录运行 npm install @dfinity/gix-components,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:svelte(^5)、@dfinity/utils(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dfinity/gix-components 支持 TypeScript 吗?

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

@dfinity/gix-components 支持 ESM 还是 CommonJS?

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

@dfinity/gix-components 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dfinity/gix-components 可以商用吗?

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

@dfinity/gix-components 的下载量有多少?

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

@dfinity/gix-components 还在维护吗?

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