@axa-ch/button

中文文档
8.2.5发布于 2023/03/06Copyright 2019 AXA Versicherungen AGCommonJS近 30 天下载 2973

The button component for the AXA Pattern Library

此软件包已被标记为弃用

Please use the new scope @axa-ch-webhub-cloud

原始使用文档
文档目录12 节
  1. Properties
  2. variant
  3. type
  4. size
  5. block
  6. motionOff
  7. disabled
  8. icon
  9. href
  10. external
  11. onClick
  12. className

AXA Button

Buttons provide a clickable element, which can be used in forms, or anywhere else where simple, standard call-to-action functionality is needed. They can also provide styled link functionality. They may display text, icons, or both. Buttons can be styled via several properties to change their look-and-feel.

Properties

variant

AttributeDetails
variant="secondary"Button in a ghost state
variant="red"Button red
variant="inverted"Button inverted
variant="inverted-blue-ocean"Button inverted blue ocean
variant="inverted-red-tosca"Button inverted red tosca
variant="inverted-purple-logan"Button inverted purple logan
variant="inverted-green-viridian"Button inverted green viridian
variant="inverted-blue-teal"Button inverted inverted blue teal

type

AttributeDetails
type="button"Default button type (default if omitted)
type="submit"Submit button submit for forms
type="reset"Reset button for forms

size

AttributeDetails
size=""Default button medium size
size="small"button small size
size="large"button large size

block

By default, buttons are inline blocks, but setting this attribute block will change the button to a full-width block element.

motionOff

The Boolean attribute motionoff deactivates hover animation.

disabled

The Boolean attribute disabled disables the button natively.

icon

Based on the string-valued attribute icon, interpreted as icon name, an icon will be rendered. To see the full list of possible icons, see the axa-icon README.

href

The string-valued attribute href is used like in a native <a> hyperlink.

external

The Boolean attribute external adds the target="_blank" functionality.

onClick

The function-valued attribute onClick can be used as a callback prop for React and other frameworks.

className

With this string attribute you can set a CSS class to the component.

版本与发布记录

@axa-ch/button 共发布 122 个版本,首次发布于 2019/05/06;过去 12 个月发布了 0 个版本。

版本发布日期距今
8.2.5latest2023/03/063 年前
8.2.42023/02/133 年前
8.2.32022/12/083 年前
8.2.22022/11/173 年前
8.2.12022/11/163 年前
8.2.02022/11/064 年前

关于 @axa-ch/button 的常见问题

@axa-ch/button 是什么?

The button component for the AXA Pattern Library注意:该包已被作者标记为弃用——Please use the new scope @axa-ch-webhub-cloud

如何安装 @axa-ch/button?

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

@axa-ch/button 支持 TypeScript 吗?

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

@axa-ch/button 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@axa-ch/button 可以商用吗?

@axa-ch/button 使用 Copyright 2019 AXA Versicherungen AG 许可。声明的许可为 Copyright 2019 AXA Versicherungen AG,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@axa-ch/button 的下载量有多少?

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

@axa-ch/button 还在维护吗?

最新版本 8.2.5 发布于 2023/03/06(3 年前);至今共发布 122 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/05/06。作者已将其标记为弃用,新项目建议寻找替代方案。