Skip to main content

ion-input-password-toggle

shadow

InputPasswordToggle 组件是 Input 的配套组件。它允许用户切换密码输入框中文本的可见性。

🌐 The InputPasswordToggle component is a companion component to Input. It allows users to toggle the visibility of text in a password input.

基本用法

🌐 Basic Usage

info

InputPasswordToggle 必须与设置了 type 属性为 'text''password'Input 一起使用。

使用任何其他 type 都会导致记录警告。

🌐 Using any other type will cause a warning to be logged.

属性

🌐 Properties

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

hideIcon

DescriptionThe icon that can be used to represent hiding a password. If not set, the "eyeOff" Ionicon will be used.
Attributehide-icon
Typestring | undefined
Defaultundefined

mode

DescriptionThe mode determines which platform styles to use.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributemode
Type"ios" | "md"
Defaultundefined

showIcon

DescriptionThe icon that can be used to represent showing a password. If not set, the "eye" Ionicon will be used.
Attributeshow-icon
Typestring | undefined
Defaultundefined

事件

🌐 Events

No events available for this component.

方法

🌐 Methods

No public methods available for this component.

CSS 阴影部分

🌐 CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

🌐 CSS Custom Properties

No CSS custom properties available for this component.

插槽

🌐 Slots

No slots available for this component.