@anypoint-web-components/anypoint-radio-button

中文文档
0.1.10发布于 2021/10/16Apache-2.0CommonJS近 30 天下载 3245

Anypoint styled radio button

原始使用文档
文档目录6 节
  1. Usage
  2. Installation
  3. In an HTML file
  4. Development
  5. Running the demo locally
  6. Running the tests

Deprecated

This component has been moved to anypoint-web-components/awc.


Accessible radio button and radio button group for Anypoint platform.

Radio buttons are used to select one of predefined options. Radio buttons should be used when the user must see all available options. Consider using a dropdown list if the options can be collapsed.

See Radio buttons documentation in Material Design documentation for principles and anatomy of radio buttons.

Published on NPM

tests

Usage

Installation

npm i --save @anypoint-web-components/anypoint-radio-button

In an HTML file

<html>
  <head>
    <script type="module">
      import '@anypoint-web-components/anypoint-radio-button/anypoint-radio-button.js';
      import '@anypoint-web-components/anypoint-radio-button/anypoint-radio-group.js';
    </script>
  </head>
  <body>
    <anypoint-radio-group selectable="anypoint-radio-button">
       <anypoint-radio-button name="a">Apple</anypoint-radio-button>
       <anypoint-radio-button name="b">Banana</anypoint-radio-button>
       <anypoint-radio-button name="c">Orange</anypoint-radio-button>
    </anypoint-radio-group>
  </body>
</html>

Development

git clone https://github.com/anypoint-web-components/anypoint-radio-button
cd anypoint-radio-button
npm install

Running the demo locally

npm start

Running the tests

npm test

版本与发布记录

@anypoint-web-components/anypoint-radio-button 共发布 11 个版本,首次发布于 2019/08/08;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.1.10latest2021/10/165 年前
0.1.92021/08/205 年前
0.1.82021/07/035 年前
0.1.72021/03/035 年前
0.1.62020/09/286 年前
0.1.52020/07/196 年前

关于 @anypoint-web-components/anypoint-radio-button 的常见问题

@anypoint-web-components/anypoint-radio-button 是什么?

Anypoint styled radio button

如何安装 @anypoint-web-components/anypoint-radio-button?

在项目目录运行 npm install @anypoint-web-components/anypoint-radio-button,或使用 pnpm add / yarn add / bun add。

@anypoint-web-components/anypoint-radio-button 支持 TypeScript 吗?

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

@anypoint-web-components/anypoint-radio-button 支持 ESM 还是 CommonJS?

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

@anypoint-web-components/anypoint-radio-button 可以商用吗?

@anypoint-web-components/anypoint-radio-button 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@anypoint-web-components/anypoint-radio-button 的下载量有多少?

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

@anypoint-web-components/anypoint-radio-button 还在维护吗?

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