Password Input

带显示 / 隐藏切换按钮的密码输入框,可作为表单控件使用。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

Other devices are signed out after the change.

导入

ts
import {
  SonePasswordInputComponent,
} from "@surface-one/angular/password-input";

API 参考

SonePasswordInputComponent组件

A password field with a show / hide toggle, on the Input Group. The toggle is a toggle button: a constant name ("Show password") and `aria-pressed`.

选择器
sone-password-input
输入
名称类型 默认值
value双向string""
visible双向

Shows the password as plain text (`[(visible)]`).

booleanfalse
autocompletePasswordAutocomplete"current-password"
placeholderstring""
inputIdstring | nullnull
namestring | nullnull
ariaLabelstring | nullnull
ariaDescribedby

Extra ids for `aria-describedby` on the input.

string | nullnull
invalidbooleanfalse
disabledbooleanfalse
readonlybooleanfalse
toggleLabel

The toggle's accessible name; its state is `aria-pressed`.

—$localize`Show password`