v1.0.7

Password Input

Installation

Install yarn add @spark-web/password-input
Source GitHub.com
Bundle unpkg.com

The password input component allows accepting of password text values. The component builds off its underlying TextInput component and toggles the input mode between password and text depending on whether the show password icon button is toggled to show or hide the password value.

Usage

The component must be nested within a Field. See Field for more details.

Examples

Field utilities

You can use the parent Field to set appropriate field level labels, description adornments and messages.

Make sure your chosen password is at least 10 characters long.

Uncontrolled

Similar to TextInput, the component can be uncontrolled and managing its own internal state.

The password value is:

Controlled

Similar to TextInput, the component can be controlled by passing in a value and onChange handler and have its state managed in a parent component.

The current password value is:

Props

The component passes props into its underlying TextInput component and are not listed here.

© 2023 Brighte Capital Pty Ltd