@freshworks/button

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

Button component in Nucleus

原始使用文档
文档目录3 节
  1. Buttons in Freshdesk
  2. Scenario
  3. Guidelines

@freshworks/button

npm version npm

ember install @freshworks/button

Buttons in Freshdesk

Buttons means operation or series of operations. Buttons are interactive components that the users can click or touch to trigger corresponding business logic.

Scenario

There are several button variants used throughout the product. They are used in pages such as articles, forms, wizards and perform actions such as saving, cancelling or sending, or call users to those actions.

Guidelines

DO’s

  1. Label button with what action it triggers.
  2. Choose appropriate button for the context.
  3. Use primary button for the primary/important action of the page.
  4. Use secondary buttons as default buttons.
  5. Use link buttons as tertiary buttons for less prominent actions.
  6. Use consistent button placement and direction for a user journey.
  7. Use button against a contrast background and have essential white space around the button.

DONT’s

  1. Avoid using too many buttons in one page.
  2. Button copy shouldn’t be too wordy.
  3. Don’t use more than one primary button in a page.
  4. Don’t use buttons instead of tabs.
  5. Don’t trigger the action without alerting the user for destructive buttons.
  6. Don’t use destructive buttons for all delete/ cancellation scenarios. More applicable for actions which involves deleting the data permanently.
  7. Don’t enable primary button before all mandatory fields are filled.

版本与发布记录

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

版本发布日期距今
0.19.1latest2023/09/203 年前
0.18.02021/03/055 年前
0.16.02020/11/195 年前
0.15.02020/10/096 年前
0.14.02020/08/216 年前
0.11.12020/08/076 年前

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

关于 @freshworks/button 的常见问题

@freshworks/button 是什么?

Button component in Nucleus

如何安装 @freshworks/button?

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

@freshworks/button 支持 TypeScript 吗?

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

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

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

@freshworks/button 可以商用吗?

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

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

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

@freshworks/button 还在维护吗?

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