UI Components ⎮ Coconut Software
React components for faster and easier web development.
Upgrading
Please see UPGRADE for details.
Releasing
Please see RELEASE for details.
Setup
Run the following commands to get up and running with this project.
yarn install
yarn run build
We use StorybookJS for developing our UI components in isolation. In order to get Storybook running, run the following command:
yarn run storybook
Recommended IDE Setup
When developing any TypeScript project within Coconut Software, the recommended approach is to install VSCode and install the recommended plugins. This project might recommend extra plugins specifically for it's use case.
Recommended Plugins
Creating a static export
yarn install
yarn run build
yarn run storybook:export
This will create a storybook-static folder that you can open up directly on your own device or zip up to share with others.
关于 @coconut-software/ui 的常见问题@coconut-software/ui 是什么? React components for faster and easier web development.
如何安装 @coconut-software/ui? 在项目目录运行 npm install @coconut-software/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:clsx(^1.1)、react(^17.0)、date-fns(^2.16)、react-dom(^17.0)、react-intl(^5.13)、tailwindcss(^3.4.10)、react-hook-form(^6.15)、react-aria-components(^1.16.0)、@internationalized/date(^3.12.0)、tailwindcss-interaction-variants(^5.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。
@coconut-software/ui 支持 TypeScript 吗? 支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。
@coconut-software/ui 支持 ESM 还是 CommonJS? 同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。
@coconut-software/ui 可以商用吗? @coconut-software/ui 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。
@coconut-software/ui 的下载量有多少? 根据 npm 官方下载统计,@coconut-software/ui 在 2026/10/10 – 2026/11/08 这 30 天内被下载 4,601 次,日均约 153 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。
@coconut-software/ui 还在维护吗? 最新版本 0.20.1 发布于 2026/11/10(今天);至今共发布 343 个版本,其中过去 12 个月发布了 33 个;首次发布于 2021/02/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。