@freshworks/modal

中文文档
0.18.1发布于 2023/09/20MIT近 30 天下载 2121

Modal component in Nucleus

原始使用文档

@freshworks/modal

npm version npm

ember install @freshworks/modal

Modals are an interactive component which appears on top of the page that stops any other interaction behind it. It has a focused task with few components within it like CTAs. Modals requires the users to critically respond to it in order to get back to primary task.

Scenario

Best use of modals is to get the task quickly done and may also support in completion of the primary task, for example: Creation of an entity and also editing it. Modal has to be relevant and carefully utilized as modal grasp users attention and may obstruct their current flow.

Guidelines

DO’s

  1. Add scroll to body (CTA to remain fixed) incase the content is more.
  2. Icon to the titles has to be contextual
  3. Focus should be on the first item in modal as it opens

DONT’s

  1. Don’t exceed maximum width of 800 px
  2. Avoid using 2 levels of modal on modal.
  3. Don’t use modal if it is not related to the user’s current taskflow.
  4. Avoid modal for complex decision making that requires additional sources of information.
  5. Avoid closing the modal on clicking outside for confirmation modals and forms dialogs in which user confirmation or input required.

版本与发布记录

@freshworks/modal 共发布 43 个版本,首次发布于 2019/11/07;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.18.1latest2023/09/203 年前
0.17.02021/03/055 年前
0.15.02020/11/195 年前
0.14.02020/10/096 年前
0.13.02020/08/216 年前
0.10.12020/08/076 年前

其他发布通道:beta → 0.1.1-alpha.31。

关于 @freshworks/modal 的常见问题

@freshworks/modal 是什么?

Modal component in Nucleus

如何安装 @freshworks/modal?

在项目目录运行 npm install @freshworks/modal,或使用 pnpm add / yarn add / bun add。

@freshworks/modal 支持 TypeScript 吗?

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

@freshworks/modal 需要什么版本的 Node.js?

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

@freshworks/modal 可以商用吗?

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

@freshworks/modal 的下载量有多少?

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

@freshworks/modal 还在维护吗?

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