@firecms/ui

中文文档
3.5.2发布于 2026/11/11MITTypeScriptESM + CJS构建来源已验证近 30 天下载 1.3万

Awesome Firebase/Firestore-based headless open-source CMS

原始使用文档
文档目录3 节
  1. FireCMS UI
  2. Why build this UI kit?
  3. Installation

FireCMS UI

FireCMS UI is a high quality set of components that you can use to build your own custom views. You can use these components to build your own FireCMS views, or in any other React application. You just need to install tailwindcss and the @firecms/ui package.

Why build this UI kit?

FireCMS was using MUI until version 3.0. MUI provides ready to use components with intuitive APIs, but it also comes with a lot of complexity and overhead. We wanted to build a simpler and more flexible UI kit that could be used in any React project, not just in FireCMS. We also wanted to make it easy to transition from MUI to our new UI kit, so we kept the API as similar as possible. The result it a set of components that are easy to use, easy to customize, much more performant and with a smaller bundle size.

The components are primarily built using Radix UI primitives and tailwindcss. This means that you can easily customize them using tailwindcss classes or override the styles using CSS.

See the full list of components in https://firecms.co/docs/components

All the components are exported from the @firecms/ui package. These are the same components used internally in FireCMS.

Installation

If you are using FireCMS, you don't need to install this package, as it is already included, and configured for you.

To use the components in your own project, you need to install the @firecms/ui package:

yarn add @firecms/ui

or

npm install @firecms/ui

You also need to install tailwindcss:

yarn add tailwindcss @tailwindcss/typography

And initialize it in your project:

npx tailwindcss init

And add then add the fireCMS preset in your tailwind.config.js:

import fireCMSConfig from "@firecms/ui/tailwind.config.js";

export default {
    presets: [fireCMSConfig],
    content: [
        "./index.html",
        "./src/**/*.{js,ts,jsx,tsx}",
        "./node_modules/@firecms/**/src/**/*.{js,ts,jsx,tsx}"
    ]
};

(You might need to adjust the paths in the content array to match your project structure)

Finally, you need to define your primary and secondary colors in your index.css file:

@import 'tailwindcss';
@import "@firecms/ui/index.css" layer(base);

@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));

@source "../index.html";
@source "./**/*.{js,ts,jsx,tsx}";
@source "../node_modules/@firecms/**/*.{js,ts,jsx,tsx}";

:root {
    --color-primary: #0070F4;
    --color-secondary: #FF5B79;
}

版本与发布记录

@firecms/ui 共发布 425 个版本,首次发布于 2023/12/29;过去 12 个月发布了 79 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.5.2latest2026/11/114 天前
3.5.2-canary.a0001bdcanary2026/11/114 天前
3.5.2-canary.a36570e2026/10/2718 天前
3.5.2-canary.09e12812026/10/2718 天前
3.5.2-canary.c5764a32026/10/131 个月前
3.5.2-canary.16bf7bb2026/10/131 个月前

其他发布通道:pre → 3.0.0-canary.297,canary → 3.5.2-canary.a0001bd。

关于 @firecms/ui 的常见问题

@firecms/ui 是什么?

Awesome Firebase/Firestore-based headless open-source CMS

如何安装 @firecms/ui?

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

@firecms/ui 支持 TypeScript 吗?

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

@firecms/ui 支持 ESM 还是 CommonJS?

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

@firecms/ui 需要什么版本的 Node.js?

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

@firecms/ui 可以商用吗?

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

@firecms/ui 的下载量有多少?

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

@firecms/ui 还在维护吗?

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