@axa-ch/icon

中文文档
8.0.11发布于 2023/03/06Copyright 2019 AXA Versicherungen AGTypeScriptCommonJS近 30 天下载 3071

The icon component for the AXA Pattern Library

此软件包已被标记为弃用

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

原始使用文档
文档目录3 节
  1. Properties
  2. Icon
  3. Size

AXA Icon

<axa-icon> renders an icon, given an icon name, a resource path or a string to a suitable SVG image.

Properties

Icon

Icon names

Attribute
icon="add"
icon="arrow-left"
icon="arrow-right"
icon="collapse"
icon="document"
icon="download"
icon="email"
icon="expand"
icon="mobile"
icon="phone"
icon="search"
icon="upload"
icon="cloud-upload"
icon="axa-logo"
icon="axa-logo-open"
icon="check-circle"
icon="check"
icon="info-outline"
icon="warning-amber"
icon="cloudy"
icon="close"

Icon resource path

The icon resource path must have .svg extension.

Icon as a SVG string

You can load your own SVG and set its html string. The string must contain <svg tag. When using a custom icon, make sure to define the icon width and height (in px) in its definition and use fill="currentColor" on paths that should inherit the color from its containing component.

Size

The default behavior set the size of the svgs to 24x24 px. To use original size on the svg use original.

Attributedescription
size="small"20x20 px
size="medium"default. 24x24 px
size="large"32x32 px
size="original"use original size of svg file you use

版本与发布记录

@axa-ch/icon 共发布 102 个版本,首次发布于 2019/04/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
8.0.11latest2023/03/063 年前
8.0.102023/02/133 年前
8.0.92022/11/163 年前
8.0.82022/09/304 年前
8.0.72022/09/204 年前
8.0.62022/09/144 年前

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

@axa-ch/icon 是什么?

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

如何安装 @axa-ch/icon?

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

@axa-ch/icon 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

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

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

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

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

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

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

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

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