@aurodesignsystem/auro-input

中文文档
4.3.4发布于 2025/03/07Apache-2.0ES Module近 30 天下载 1935

auro-input HTML custom element

原始使用文档
文档目录14 节
  1. UI development browser support
  2. Install
  3. Design Token CSS Custom Property dependency
  4. Define dependency in project component
  5. Install bundled assets from CDN
  6. Bundle example code
  7. auro-input use cases
  8. API Code Examples
  9. Default auro-input
  10. Development
  11. Start development environment
  12. API generation
  13. Testing
  14. Bundled assets

Input (DEPRECATED)

WARNING: This component is deprecated and is no longer supported. Please migrate to the new Auro Formkit instead.

Use the <auro-input> custom element to create basic single-line text fields. Supports type text, password, and email with validation, required input, error states and a secondary bordered theme. Use the slots label and helptext for additional content support.

UI development browser support

For the most up to date information on UI development browser support

Install

Build Status See it on NPM! License ESM supported

$ npm i @aurodesignsystem/auro-input

Installing as a direct, dev or peer dependency is up to the user installing the package. If you are unsure as to what type of dependency you should use, consider reading this stack overflow answer.

Design Token CSS Custom Property dependency

The use of any Auro custom element has a dependency on the Auro Design Tokens.

Define dependency in project component

Defining the component dependency within each component that is using the <auro-input> component.

import "@aurodesignsystem/auro-input";

Reference component in HTML

<auro-input></auro-input>
<auro-input bordered></auro-input>

Install bundled assets from CDN

In cases where the project is not able to process JS assets, there are pre-processed assets available for use. See -- auro-input__bundled.js for modern browsers. Legacy browsers such as IE11 are no longer supported.

WARNING! When installing into your application environment, DO NOT use @latest for the requested version. Risks include unknown MAJOR version releases and instant adoption of any new features and possible bugs without developer knowledge. The @latest wildcard should NEVER be used for production customer-facing applications. You have been warned.

Bundle example code

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/[email protected]/dist/auro-classic/CSSCustomProperties.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/[email protected]/dist/bundled/essentials.css" />
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/[email protected]/dist/auro-input__bundled.js" type="module"></script>

auro-input use cases

The <auro-input> element should be used in situations where users may:

  • needs to enter information
  • be filling out a form

API Code Examples

Default auro-input

<auro-input></auro-input>
<auro-input bordered></auro-input>

Development

In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.

Please be sure to review the contribution guidelines for this project. Please make sure to pay special attention to the conventional commits section of the document.

Start development environment

Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the dev server.

$ npm run dev

Open localhost:8000

If running separate sessions is preferred, please run the following commands in individual terminal shells.

$ npm run build:watch

$ npm run serve

API generation

The custom element API file is generated in the build and committed back to the repo with a version change. If the API doc has changed without a version change, author's are to run npm run build:api to generate the doc and commit to version control.

Testing

Automated tests are required for every Auro component. See .\test\auro-input.test.js for the tests for this component. Run npm test to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See the testing documentation for more details.

Bundled assets

Bundled assets are only generated in the remote and not merged back to this repo. To review and/or test a bundled asset locally, run $ npm run bundler to generate assets.

版本与发布记录

@aurodesignsystem/auro-input 共发布 75 个版本,首次发布于 2021/11/04;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.3.4latest2025/03/071.7 年前
4.3.32025/02/091.7 年前
4.3.22025/02/091.7 年前
4.3.12024/12/231.9 年前
4.3.02024/11/222 年前
4.2.02024/11/132 年前

其他发布通道:beta → 4.0.0-beta.2。

关于 @aurodesignsystem/auro-input 的常见问题

@aurodesignsystem/auro-input 是什么?

auro-input HTML custom element

如何安装 @aurodesignsystem/auro-input?

在项目目录运行 npm install @aurodesignsystem/auro-input,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@alaskaairux/icons(^4.43.0)、@aurodesignsystem/design-tokens(^4.13.0)、@aurodesignsystem/webcorestylesheets(^6.0.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aurodesignsystem/auro-input 支持 TypeScript 吗?

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

@aurodesignsystem/auro-input 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aurodesignsystem/auro-input 需要什么版本的 Node.js?

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

@aurodesignsystem/auro-input 可以商用吗?

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

@aurodesignsystem/auro-input 的下载量有多少?

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

@aurodesignsystem/auro-input 还在维护吗?

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