Form Password Input

GitHub

Password input with a toggle that shows or hides the entered value.

Installation

bash
pnpm dlx shadcn@latest add @cs/form-password-input

Usage

tsx
import { FormPasswordInput } from "@/components/cs/form-password-input"
tsx
<FormPasswordInput name="password" />

API Reference

FormPasswordInput

Password input with a toggle that shows or hides the entered value.

Props

NameTypeDefaultDescription
hideLabelstring"Passwort verbergen"Accessible label for the hide-password control.
iconReactNode<Lock />Icon displayed inside the input on the left.
inputClassNamestring | undefined-Additional classes applied to the native input control.
labelReactNode-Field label and fallback placeholder.
name *string-Form field name used for submission and validation errors.
orientation"vertical" | "horizontal" | "responsive" | null | undefined-Layout of the field label and input control.
showLabelstring"Passwort anzeigen"Accessible label for the show-password control.