A password input component with a toggle to show/hide the password.
The component props.
The rendered password input with a toggle button.
Wraps the Input component and adds a button to toggle the type attribute between "password" and "text".
type
import { string, minLength } from 'valibot';import { Password } from './input';const passwordSchema = string([minLength(8)]);function PasswordField() { return ( <Password name="password" validate={passwordSchema} autoComplete="current-password" /> );} Copy
import { string, minLength } from 'valibot';import { Password } from './input';const passwordSchema = string([minLength(8)]);function PasswordField() { return ( <Password name="password" validate={passwordSchema} autoComplete="current-password" /> );}
A password input component with a toggle to show/hide the password.