@easypost/easy-ui

中文文档
1.0.0-alpha.151发布于 2026/11/11构建来源已验证近 30 天下载 3163

简单UI 是一个组件库,旨在帮助开发人员为使用 EasyPost 的托运人创造最佳经验.

中文使用文档
文档目录5 节
  1. 开始
  2. 字体
  3. 服务器渲染
  4. 发展
  5. 图标

简单UI

简单UI 是一个组件库,旨在帮助开发人员为使用 EasyPost 的托运人创造最佳经验.

开始

  1. 使用 Easy UI 安装 无 或您的项目软件包管理器 :
npm install @easypost/easy-ui --save
  1. 将 Easy UI CSS 文件包含在您的应用条目中 :
import "@easypost/easy-ui/style.css";
  1. 在Easy UI里播放您的应用程序 Provider数字 :
import { Provider as EasyUIProvider } from "@easypost/easy-ui/Provider";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <EasyUIProvider>
    <App />
  </EasyUIProvider>,
);
  1. 使用 Easy UI 组件 :
import { VerticalStack } from "@easypost/easy-ui/VerticalStack";
import { Button } from "@easypost/easy-ui/Button";

function App() {
  return (
    <VerticalStack>
      <Button>Click me!</Button>
    </VerticalStack>
  );
}

看我们的 故事书 详细组成部分文件.

字体

简单UI Poppins 字体。 你可以自己主持,也可以使用Google字体. 由于自己主持, Poppins 包含在 .storybook/public/fonts/poppins。 。 。 .

如果托管您自己, 请在样式表内包含此声明, 用字体所在位置替换路径 :

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-300.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-300.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-400.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-400.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-500.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-500.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-600.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-600.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-700.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-700.woff") format("woff");
}

服务器渲染

当服务器渲染一个使用 Easy UI 和 React < 18 的应用程序时, 您的应用程序必须被一个 React Aria 的单实例所包裹 SSRProvider。如果一个应用程序正在使用附加版本的 React Aria,确保只有一个版本的 @react-aria/ssr 利用国家预防机制 overrides 或者亚恩的 resolutions 属性.

发展

我们用"故事书"来创建一个简单的,热量重载的游乐场,用于开发这些组件.

图标

命令运行
npm run build构建工程
npm run clean删除临时目录
npm run lint启动项目( ESLint、 Stylelint、 Pretier)
npm run test测试工程
npm run test:watch用手表模式测试工程

版本与发布记录

@easypost/easy-ui 共发布 151 个版本,首次发布于 2023/03/30;过去 12 个月发布了 48 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.0-alpha.151latest2026/11/112 天前
1.0.0-alpha.1502026/11/103 天前
1.0.0-alpha.1492026/11/103 天前
1.0.0-alpha.1482026/11/076 天前
1.0.0-alpha.1472026/11/049 天前
1.0.0-alpha.1462026/11/049 天前

其他发布通道:alpha → 1.0.0-alpha.0。

关于 @easypost/easy-ui 的常见问题

@easypost/easy-ui 是什么?

简单UI 是一个组件库,旨在帮助开发人员为使用 EasyPost 的托运人创造最佳经验.

如何安装 @easypost/easy-ui?

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

@easypost/easy-ui 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/easypost__easy-ui 是否存在。

@easypost/easy-ui 可以商用吗?

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

@easypost/easy-ui 的下载量有多少?

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

@easypost/easy-ui 还在维护吗?

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